]> git.decadent.org.uk Git - nfs-utils.git/blob - support/include/xlog.h
2001-04-01 Chip Salzenberg <chip@valinux.com>
[nfs-utils.git] / support / include / xlog.h
1 /*
2  * xlog         Logging functionality
3  *
4  * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de>
5  */
6
7 #ifndef XLOG_H
8 #define XLOG_H
9
10 #define L_FATAL         0x0100
11 #define L_ERROR         0x0200
12 #define L_WARNING       0x0400
13 #define L_NOTICE        0x0800
14 #define L_ALL           0xFF00
15
16 #define D_GENERAL       0x0001          /* general debug info */
17 #define D_CALL          0x0002
18 #define D_AUTH          0x0004
19 #define D_FAC3          0x0008
20 #define D_FAC4          0x0010
21 #define D_FAC5          0x0020
22 #define D_PARSE         0x0040
23 #define D_FAC7          0x0080
24 #define D_ALL           0x00FF
25
26 /* This can be used to define symbolic log names that can be passed to
27  * xlog_config. */
28 struct xlog_debugfac {
29         char            *df_name;
30         int             df_fac;
31 };
32
33 void                    xlog_open(char *progname);
34 void                    xlog_background(void);
35 void                    xlog_config(int fac, int on);
36 void                    xlog_sconfig(char *, int on);
37 int                     xlog_enabled(int fac);
38 void                    xlog(int fac, const char *fmt, ...);
39
40 #endif /* XLOG_H */