1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 #ifndef SYSLOG_H
22 #define SYSLOG_H
23 #define WIN32_LEAN_AND_MEAN
24 #include <windows.h>
25
26 #define LOG_EMERG 1
27 #define LOG_ALERT 1
28 #define LOG_CRIT 1
29 #define LOG_ERR 4
30 #define LOG_WARNING 5
31 #define LOG_NOTICE 6
32 #define LOG_INFO 6
33 #define LOG_DEBUG 6
34
35 #define LOG_PRIMASK 0x07
36
37 #define LOG_PRI(p) ((p) & LOG_PRIMASK)
38 #define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
39
40 #define LOG_KERN (0<<3)
41 #define LOG_USER (1<<3)
42 #define LOG_MAIL (2<<3)
43 #define LOG_DAEMON (3<<3)
44 #define LOG_AUTH (4<<3)
45 #define LOG_SYSLOG (5<<3)
46 #define LOG_LPR (6<<3)
47 #define LOG_NEWS (7<<3)
48 #define LOG_UUCP (8<<3)
49 #define LOG_CRON (9<<3)
50 #define LOG_AUTHPRIV (10<<3)
51
52 #define LOG_NFACILITIES 10
53 #define LOG_FACMASK 0x03f8
54 #define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
55
56 #define LOG_MASK(pri) (1 << (pri))
57 #define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1)
58
59
60
61
62
63
64
65 #define LOG_PID 0x01
66 #define LOG_CONS 0x02
67 #define LOG_ODELAY 0x04
68 #define LOG_NDELAY 0x08
69 #define LOG_NOWAIT 0x10
70 #define LOG_PERROR 0x20
71
72
73 extern void closelog(void);
74 extern void openlog(const char *, int, int);
75 extern void syslog(int, const char *, ...);
76
77
78 #endif