xref: /original-bsd/sys/sys/syslog.h (revision afe6d20d)
1 /*
2  * Copyright (c) 1982, 1986 Regents of the University of California.
3  * All rights reserved.  The Berkeley software License Agreement
4  * specifies the terms and conditions for redistribution.
5  *
6  *	@(#)syslog.h	7.7 (Berkeley) 04/20/87
7  */
8 
9 /*
10  *  Facility codes
11  */
12 
13 #define LOG_KERN	(0<<3)	/* kernel messages */
14 #define LOG_USER	(1<<3)	/* random user-level messages */
15 #define LOG_MAIL	(2<<3)	/* mail system */
16 #define LOG_DAEMON	(3<<3)	/* system daemons */
17 #define LOG_AUTH	(4<<3)	/* security/authorization messages */
18 #define LOG_SYSLOG	(5<<3)	/* messages generated internally by syslogd */
19 #define LOG_LPR		(6<<3)	/* line printer subsystem */
20 #define LOG_NEWS	(7<<3)	/* network news subsystem */
21 #define LOG_UUCP	(8<<3)	/* UUCP subsystem */
22 	/* other codes through 15 reserved for system use */
23 #define LOG_LOCAL0	(16<<3)	/* reserved for local use */
24 #define LOG_LOCAL1	(17<<3)	/* reserved for local use */
25 #define LOG_LOCAL2	(18<<3)	/* reserved for local use */
26 #define LOG_LOCAL3	(19<<3)	/* reserved for local use */
27 #define LOG_LOCAL4	(20<<3)	/* reserved for local use */
28 #define LOG_LOCAL5	(21<<3)	/* reserved for local use */
29 #define LOG_LOCAL6	(22<<3)	/* reserved for local use */
30 #define LOG_LOCAL7	(23<<3)	/* reserved for local use */
31 
32 #define LOG_NFACILITIES	24	/* maximum number of facilities */
33 #define LOG_FACMASK	0x03f8	/* mask to extract facility part */
34 
35 /*
36  *  Priorities (these are ordered)
37  */
38 
39 #define LOG_EMERG	0	/* system is unusable */
40 #define LOG_ALERT	1	/* action must be taken immediately */
41 #define LOG_CRIT	2	/* critical conditions */
42 #define LOG_ERR		3	/* error conditions */
43 #define LOG_WARNING	4	/* warning conditions */
44 #define LOG_NOTICE	5	/* normal but signification condition */
45 #define LOG_INFO	6	/* informational */
46 #define LOG_DEBUG	7	/* debug-level messages */
47 
48 #define LOG_PRIMASK	0x0007	/* mask to extract priority part (internal) */
49 
50 /*
51  *  Option flags for openlog.
52  *
53  *	LOG_ODELAY no longer does anything; LOG_NDELAY is the
54  *	inverse of what it used to be.
55  */
56 #define	LOG_PID		0x01	/* log the pid with each message */
57 #define	LOG_CONS	0x02	/* log on the console if errors in sending */
58 #define	LOG_ODELAY	0x04	/* delay open until first syslog() (default) */
59 #define LOG_NDELAY	0x08	/* don't delay open */
60 #define LOG_NOWAIT	0x10	/* if forking to log on console, don't wait() */
61