Commit /bin/cc.exe (a hardlink of /bin/gcc.exe)
[msysgit.git] / include / sys / syslog.h
blobf3195175e428a77fc0d594ca4824b0ffd1dd8dc4
1 /* sys/syslog.h
3 Copyright 1996, 1998, 2001 Red Hat, Inc.
5 This file is part of Cygwin.
7 This software is a copyrighted work licensed under the terms of the
8 Cygwin license. Please consult the file "CYGWIN_LICENSE" for
9 details. */
11 #ifndef _SYS_LOG_H
12 #define _SYS_LOG_H
14 #include <sys/cdefs.h>
15 #define LOG_EMERG 0
16 #define LOG_ALERT 1
17 #define LOG_CRIT 2
18 #define LOG_ERR 3
19 #define LOG_WARNING 4
20 #define LOG_NOTICE 5
21 #define LOG_INFO 6
22 #define LOG_DEBUG 7
24 #define LOG_PRIMASK 0x07
26 #define LOG_PRI(p) ((p) & LOG_PRIMASK)
27 #define LOG_MAKEPRI(fac, pri) (((fac) << 3) | (pri))
29 #define LOG_KERN (0<<3)
30 #define LOG_USER (1<<3)
31 #define LOG_MAIL (2<<3)
32 #define LOG_DAEMON (3<<3)
33 #define LOG_AUTH (4<<3)
34 #define LOG_SYSLOG (5<<3)
35 #define LOG_LPR (6<<3)
36 #define LOG_NEWS (7<<3)
37 #define LOG_UUCP (8<<3)
38 #define LOG_CRON (9<<3)
39 #define LOG_AUTHPRIV (10<<3)
40 #define LOG_FTP (11<<3)
42 /* Codes through 15 are reserved for system use */
43 #define LOG_LOCAL0 (16<<3)
44 #define LOG_LOCAL1 (17<<3)
45 #define LOG_LOCAL2 (18<<3)
46 #define LOG_LOCAL3 (19<<3)
47 #define LOG_LOCAL4 (20<<3)
48 #define LOG_LOCAL5 (21<<3)
49 #define LOG_LOCAL6 (22<<3)
50 #define LOG_LOCAL7 (23<<3)
52 #define LOG_NFACILITIES 24
53 #define LOG_FACMASK 0x03f8
54 #define LOG_FAC(p) (((p) & LOG_FACMASK) >> 3)
56 #define LOG_MASK(pri) (1 << (pri))
57 #define LOG_UPTO(pri) ((1 << ((pri)+1)) - 1)
60 * Option flags for openlog.
62 * LOG_ODELAY no longer does anything.
63 * LOG_NDELAY is the inverse of what it used to be.
65 #define LOG_PID 0x01 /* log the pid with each message */
66 #define LOG_CONS 0x02 /* log on the console if errors in sending */
67 #define LOG_ODELAY 0x04 /* delay open until first syslog() (default) */
68 #define LOG_NDELAY 0x08 /* don't delay open */
69 #define LOG_NOWAIT 0x10 /* don't wait for console forks: DEPRECATED */
70 #define LOG_PERROR 0x20 /* log to stderr as well */
72 __BEGIN_DECLS
75 void closelog (void);
76 void openlog (const char *, int, int);
77 int setlogmask (int);
78 void syslog (int, const char *, ...);
80 __END_DECLS
83 #endif /* _SYS_LOG_H */