xref: /netbsd-src/external/bsd/ntp/dist/sntp/log.h (revision cdfa2a7ef92791ba9db70a584a1d904730e6fb46)
1 /*	$NetBSD: log.h,v 1.9 2020/05/25 20:47:32 christos Exp $	*/
2 
3 #ifndef LOG_H
4 #define LOG_H
5 
6 #include "ntp.h"
7 #include "ntp_stdlib.h"
8 #include <stdio.h>
9 #include <stdlib.h>
10 #include <stdarg.h>
11 #include <syslog.h>
12 #include <time.h>
13 
14 /* syslog as ntpd does, even though we are not a daemon */
15 #ifdef LOG_NTP
16 # define OPENLOG_FAC	LOG_NTP
17 #else
18 # ifndef LOG_DAEMON
19 #  define LOG_DAEMON	0
20 # endif
21 # define OPENLOG_FAC	LOG_DAEMON
22 #endif
23 
24 void sntp_init_logging(const char *program);
25 void open_logfile(const char *logfile);
26 
27 extern char const *progname;		/* for msyslog use too */
28 
29 #endif
30