2 * xlog Logging functionality
4 * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
12 /* These are logged always. L_FATAL also does exit(1) */
13 #define L_FATAL 0x0100
14 #define L_ERROR 0x0200
15 #define L_WARNING 0x0400
16 #define L_NOTICE 0x0800
19 /* These are logged if enabled with xlog_[s]config */
20 /* NB: code does not expect ORing together D_ and L_ */
21 #define D_GENERAL 0x0001 /* general debug info */
27 #define D_PARSE 0x0040
31 /* This can be used to define symbolic log names that can be passed to
33 struct xlog_debugfac {
38 void xlog_open(char *progname);
39 void xlog_stderr(int on);
40 void xlog_syslog(int on);
41 void xlog_config(int fac, int on);
42 void xlog_sconfig(char *, int on);
43 int xlog_enabled(int fac);
44 void xlog(int fac, const char *fmt, ...);
45 void xlog_warn(const char *fmt, ...);
46 void xlog_err(const char *fmt, ...);
47 void xlog_backend(int fac, const char *fmt, va_list args);