diff options
Diffstat (limited to 'include/ntp_syslog.h')
-rw-r--r-- | include/ntp_syslog.h | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/include/ntp_syslog.h b/include/ntp_syslog.h index 12f78292b1ea..a0152b53d9ca 100644 --- a/include/ntp_syslog.h +++ b/include/ntp_syslog.h @@ -7,19 +7,23 @@ #include <ntp_types.h> /* u_int32 type */ -# ifdef VMS +#ifdef VMS extern void msyslog(); -# else -# ifndef SYS_VXWORKS -# include <syslog.h> -# endif -# endif /* VMS */ -# include <stdio.h> +#else +# ifndef SYS_VXWORKS +# include <syslog.h> +# endif +#endif /* VMS */ +#include <stdio.h> -extern int syslogit; -extern int msyslog_term; /* duplicate to stdout/err */ -extern FILE *syslog_file; /* if syslogit is FALSE, log to +extern int syslogit; +extern int msyslog_term; /* duplicate to stdout/err */ +extern int msyslog_term_pid; +extern int msyslog_include_timestamp; +extern FILE * syslog_file; /* if syslogit is FALSE, log to this file and not syslog */ +extern char * syslog_fname; +extern char * syslog_abs_fname; #if defined(VMS) || defined (SYS_VXWORKS) #define LOG_EMERG 0 /* system is unusable */ @@ -69,6 +73,13 @@ extern FILE *syslog_file; /* if syslogit is FALSE, log to #define NLOG_SYNCSTATIST 0x00008000 /* sync statistics output */ extern u_int32 ntp_syslogmask; -#define NLOG(_X_) if (ntp_syslogmask & (_X_)) + +#define NLOG(bits) if (ntp_syslogmask & (bits)) + +#define LOGIF(nlog_suffix, msl_args) \ +do { \ + NLOG(NLOG_##nlog_suffix) /* like "if (...) */ \ + msyslog msl_args; \ +} while (FALSE) #endif /* NTP_SYSLOG_H */ |