|
|
1.1 root 1: #ifndef XP_SYSLOG_H_
2: #define XP_SYSLOG_H_
3: #include <stdarg.h>
4:
5:
6: /* priorities */
7: #define LOG_EMERG 0 /* system is unusable */
8: #define LOG_ALERT 1 /* action must be taken immediately */
9: #define LOG_CRIT 2 /* critical conditions */
10: #define LOG_ERR 3 /* error conditions */
11: #define LOG_WARNING 4 /* warning conditions */
12: #define LOG_NOTICE 5 /* normal but significant condition */
13: #define LOG_INFO 6 /* informational */
14: #define LOG_DEBUG 7 /* debug-level messages */
15:
16: #define LOG_KERN (0<<3) /* kernel messages */
17: #define LOG_USER (1<<3) /* random user-level messages */
18: #define LOG_MAIL (2<<3) /* mail system */
19: #define LOG_DAEMON (3<<3) /* system daemons */
20: #define LOG_AUTH (4<<3) /* authorization messages */
21: #define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */
22: #define LOG_LPR (6<<3) /* line printer subsystem */
23: #define LOG_NEWS (7<<3) /* network news subsystem */
24: #define LOG_UUCP (8<<3) /* UUCP subsystem */
25: #define LOG_CRON (9<<3) /* clock daemon */
26: #define LOG_AUTHPRIV (10<<3) /* authorization messages (private) */
27: /* Facility #10 clashes in DEC UNIX, where */
28: /* it's defined as LOG_MEGASAFE for AdvFS */
29: /* event logging. */
30: #define LOG_FTP (11<<3) /* ftp daemon */
31: #define LOG_NTP (12<<3) /* NTP subsystem */
32: #define LOG_SECURITY (13<<3) /* security subsystems (firewalling, etc.) */
33: #define LOG_CONSOLE (14<<3) /* /dev/console output */
34:
35: /* facility codes */
36: #define LOG_LOCAL0 (16<<3) /* reserved for local use */
37: #define LOG_LOCAL1 (17<<3) /* reserved for local use */
38: #define LOG_LOCAL2 (18<<3) /* reserved for local use */
39: #define LOG_LOCAL3 (19<<3) /* reserved for local use */
40: #define LOG_LOCAL4 (20<<3) /* reserved for local use */
41: #define LOG_LOCAL5 (21<<3) /* reserved for local use */
42: #define LOG_LOCAL6 (22<<3) /* reserved for local use */
43: #define LOG_LOCAL7 (23<<3) /* reserved for local use */
44:
45: /* Masks to extract parts */
46: #define LOG_PRIMASK 0x07 /* mask to extract priority part */
47: #define LOG_FACMASK 0x03f8 /* mask to extract facility part */
48:
49: /* Logopts for xp_openlog() */
50: #define LOG_CONS 0x02 /* log on the console if errors in sending */
51: #define LOG_PERROR 0x20 /* log to stderr as well */
52:
53: /* Port number */
54: #define SYSLOG_PORT 514
55:
56: void xp_set_loghost(const char *hostname);
57: void xp_openlog(const char *ident, int logopt, int facility);
58: void xp_vsyslog(int priority, const char *message, va_list va);
59: void xp_syslog(int priority, const char *message, ...);
60:
61: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.