chiark / gitweb /
a58ef056743f986a4aa86de6776c934efb954cc5
[elogind.git] / klibc / klibc / include / syslog.h
1 /*
2  * syslog.h
3  */
4
5 #ifndef _SYSLOG_H
6 #define _SYSLOG_H
7
8 #include <klibc/extern.h>
9 #include <stdarg.h>
10
11 /* Alert levels */
12 #define LOG_EMERG       0
13 #define LOG_ALERT       1
14 #define LOG_CRIT        2
15 #define LOG_ERR         3
16 #define LOG_WARNING     4
17 #define LOG_NOTICE      5
18 #define LOG_INFO        6
19 #define LOG_DEBUG       7
20
21 #define LOG_PRIMASK     7
22 #define LOG_PRI(x)      ((x) & LOG_PRIMASK)
23
24
25 /* Facilities; not actually used */
26 #define LOG_KERN        0000
27 #define LOG_USER        0010
28 #define LOG_MAIL        0020
29 #define LOG_DAEMON      0030
30 #define LOG_AUTH        0040
31 #define LOG_SYSLOG      0050
32 #define LOG_LPR         0060
33 #define LOG_NEWS        0070
34 #define LOG_UUCP        0100
35 #define LOG_CRON        0110
36 #define LOG_AUTHPRIV    0120
37 #define LOG_FTP         0130
38 #define LOG_LOCAL0      0200
39 #define LOG_LOCAL1      0210
40 #define LOG_LOCAL2      0220
41 #define LOG_LOCAL3      0230
42 #define LOG_LOCAL4      0240
43 #define LOG_LOCAL5      0250
44 #define LOG_LOCAL6      0260
45 #define LOG_LOCAL7      0270
46
47 #define LOG_FACMASK     01770
48 #define LOG_FAC(x)      (((x) >> 3) & (LOG_FACMASK >> 3))
49
50 __extern void openlog(const char *, int, int);
51 __extern void syslog(int, const char *, ...);
52 __extern void closelog(void);
53 __extern void vsyslog(int, const char *format, va_list ap);
54
55 #endif /* _SYSLOG_H */