1290001Sglebius#ifndef LOG_H
2290001Sglebius#define LOG_H
3290001Sglebius
4290001Sglebius#include "ntp.h"
5290001Sglebius#include "ntp_stdlib.h"
6290001Sglebius#include <stdio.h>
7290001Sglebius#include <stdlib.h>
8290001Sglebius#include <stdarg.h>
9290001Sglebius#include <syslog.h>
10290001Sglebius#include <time.h>
11290001Sglebius
12290001Sglebius/* syslog as ntpd does, even though we are not a daemon */
13290001Sglebius#ifdef LOG_NTP
14290001Sglebius# define OPENLOG_FAC	LOG_NTP
15290001Sglebius#else
16290001Sglebius# ifndef LOG_DAEMON
17290001Sglebius#  define LOG_DAEMON	0
18290001Sglebius# endif
19290001Sglebius# define OPENLOG_FAC	LOG_DAEMON
20290001Sglebius#endif
21290001Sglebius
22290001Sglebiusvoid sntp_init_logging(const char *program);
23290001Sglebiusvoid open_logfile(const char *logfile);
24290001Sglebius
25290001Sglebiusextern char const *progname;		/* for msyslog use too */
26290001Sglebius
27290001Sglebius#endif
28