Thread View: comp.sys.next.sysadmin
2 messages
2 total messages
Started by Paul S. Sears
Tue, 29 Sep 1992 18:01
Is there a list of facilities and levels for syslog?
Author: Paul S. Sears
Date: Tue, 29 Sep 1992 18:01
Date: Tue, 29 Sep 1992 18:01
49 lines
3093 bytes
3093 bytes
Is there a list anywhere of what facilities can be logged via the syslog
daemon? There are possible 24 facilities (max defined in syslog.h) of which
15 are claimed by the system but only 7 make any sense. Does anyone know what
are the other 8 system facilities? How do you use the 8 local facilities?
#define LOG_KERN (0<<3) /* kernel messages */
#define LOG_USER (1<<3) /* random user-level messages */
#define LOG_MAIL (2<<3) /* mail system */
#define LOG_DAEMON (3<<3) /* system daemons */
#define LOG_AUTH (4<<3) /* security/authorization messages */
#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */
#define LOG_LPR (6<<3) /* line printer subsystem */
/* other codes through 15 reserved for system use */
#define LOG_LOCAL0 (16<<3) /* reserved for local use */
#define LOG_LOCAL1 (17<<3) /* reserved for local use */
#define LOG_LOCAL2 (18<<3) /* reserved for local use */
#define LOG_LOCAL3 (19<<3) /* reserved for local use */
#define LOG_LOCAL4 (20<<3) /* reserved for local use */
#define LOG_LOCAL5 (21<<3) /* reserved for local use */
#define LOG_LOCAL6 (22<<3) /* reserved for local use */
#define LOG_LOCAL7 (23<<3) /* reserved for local use */
#define LOG_NFACILITIES 24 /* maximum number of facilities */
Is there and explaination of what different levels there are? For example, I
know that debug has a lower priority than info, but what are all the levels
possible?? Are the only levels as follows:
#define LOG_EMERG 0 /* system is unusable */
#define LOG_ALERT 1 /* action must be taken immediately */
#define LOG_CRIT 2 /* critical conditions */
#define LOG_ERR 3 /* error conditions */
#define LOG_WARNING 4 /* warning conditions */
#define LOG_NOTICE 5 /* normal but signification condition */
#define LOG_INFO 6 /* informational */
#define LOG_DEBUG 7 /* debug-level messages */
So if we want to log _everything_ about a specific facility, then we should do
a _facility_.debug to get all the messages??
--
Paul S. Sears * sears@uh.edu (NeXT Mail OK)
The University of Houston * suggestions@tree.egr.uh.edu (NeXT
Engineering Computing Center * comments, complaints, questions)
NeXT System Administration * DoD#1967 '83 NightHawk 650SC
>>> SSI Diving Certification #755020059 <<<
"Programming is like sex: One mistake and you support it a lifetime."
Re: Is there a list of facilities and levels for syslog?
Author: Louis A. Mamakos
Date: Thu, 01 Oct 1992 18:37
Date: Thu, 01 Oct 1992 18:37
60 lines
3893 bytes
3893 bytes
In article <1992Sep29.180113.15788@menudo.uh.edu> sears@tree.egr.uh.edu writes: > >Is there a list anywhere of what facilities can be logged via the syslog >daemon? There are possible 24 facilities (max defined in syslog.h) of which >15 are claimed by the system but only 7 make any sense. Does anyone know what >are the other 8 system facilities? How do you use the 8 local facilities? > >#define LOG_KERN (0<<3) /* kernel messages */ >#define LOG_USER (1<<3) /* random user-level messages */ >#define LOG_MAIL (2<<3) /* mail system */ >#define LOG_DAEMON (3<<3) /* system daemons */ >#define LOG_AUTH (4<<3) /* security/authorization messages */ >#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */ >#define LOG_LPR (6<<3) /* line printer subsystem */ > /* other codes through 15 reserved for system use */ >#define LOG_LOCAL0 (16<<3) /* reserved for local use */ >#define LOG_LOCAL1 (17<<3) /* reserved for local use */ >#define LOG_LOCAL2 (18<<3) /* reserved for local use */ >#define LOG_LOCAL3 (19<<3) /* reserved for local use */ >#define LOG_LOCAL4 (20<<3) /* reserved for local use */ >#define LOG_LOCAL5 (21<<3) /* reserved for local use */ >#define LOG_LOCAL6 (22<<3) /* reserved for local use */ >#define LOG_LOCAL7 (23<<3) /* reserved for local use */ These are in fact all of the syslog facilities available. Think of the "facility" as an identification of the service or type of messages being logged by a daemon or process or whatever. The first few facilities (KERN, USER, MAIL, etc) are just well know facilities. The LOCAL ones are just that: for local use. For example, in a daemon that I run, I pass LOG_LOCAL3 to the openlog() function so that I can easily catch messages to that facility to a seperate log file as specified in the syslog.conf file. >Is there and explaination of what different levels there are? For example, I >know that debug has a lower priority than info, but what are all the levels >possible?? Are the only levels as follows: > >#define LOG_EMERG 0 /* system is unusable */ >#define LOG_ALERT 1 /* action must be taken immediately */ >#define LOG_CRIT 2 /* critical conditions */ >#define LOG_ERR 3 /* error conditions */ >#define LOG_WARNING 4 /* warning conditions */ >#define LOG_NOTICE 5 /* normal but signification condition */ >#define LOG_INFO 6 /* informational */ >#define LOG_DEBUG 7 /* debug-level messages */ There are in fact all of the level. You don't *log* at more than one level at a time in a given program. When you invoke the syslog() function, you pass a level which indicates the serverity of the message being logged. The syslog daemon, on the other hand, has a way of specifing what messages are actually saved to log files. So, in syslogd, if you say you want INFO messages saved, you also get NOTICE, WARNING, ERR, CRIT, ALERT and EMERG messages as well; the idea being that if you are interested in casual messages, you probably are interested in the more important ones as well. Messages logged at a less severe level than you specified in the syslog.conf file are not saved. louie
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads