]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - support/include/xlog.h
Sanitise stderr logging.
[nfs-utils.git] / support / include / xlog.h
index 2a839c7caa69284e2d626a719275aa4db670474a..cf9bc916941ace96fc7e8ca551524215e6bd227e 100644 (file)
@@ -7,12 +7,15 @@
 #ifndef XLOG_H
 #define XLOG_H
 
+/* These are logged always. L_FATAL also does exit(1) */
 #define L_FATAL                0x0100
 #define L_ERROR                0x0200
 #define L_WARNING      0x0400
 #define L_NOTICE       0x0800
 #define L_ALL          0xFF00
 
+/* These are logged if enabled with xlog_[s]config */
+/* NB: code does not expect ORing together D_ and L_ */
 #define D_GENERAL      0x0001          /* general debug info */
 #define D_CALL         0x0002
 #define D_AUTH         0x0004
@@ -31,7 +34,8 @@ struct xlog_debugfac {
 };
 
 void                   xlog_open(char *progname);
-void                   xlog_background(void);
+void                   xlog_stderr(int on);
+void                   xlog_syslog(int on);
 void                   xlog_config(int fac, int on);
 void                   xlog_sconfig(char *, int on);
 int                    xlog_enabled(int fac);