2013-12-04 21:33:17 +00:00
|
|
|
#ifndef LOG_H
|
|
|
|
#define LOG_H
|
|
|
|
|
|
|
|
#include "ntp.h"
|
|
|
|
#include "ntp_stdlib.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <syslog.h>
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
/* syslog as ntpd does, even though we are not a daemon */
|
|
|
|
#ifdef LOG_NTP
|
|
|
|
# define OPENLOG_FAC LOG_NTP
|
|
|
|
#else
|
|
|
|
# ifndef LOG_DAEMON
|
|
|
|
# define LOG_DAEMON 0
|
|
|
|
# endif
|
|
|
|
# define OPENLOG_FAC LOG_DAEMON
|
|
|
|
#endif
|
|
|
|
|
2014-12-20 22:52:39 +00:00
|
|
|
void sntp_init_logging(const char *program);
|
2013-12-04 21:33:17 +00:00
|
|
|
void open_logfile(const char *logfile);
|
|
|
|
|
2015-10-21 19:16:13 +00:00
|
|
|
extern char const *progname; /* for msyslog use too */
|
2014-12-20 22:52:39 +00:00
|
|
|
|
2013-12-04 21:33:17 +00:00
|
|
|
#endif
|