Re: What Priority?

David Monro (davidm@cs.su.oz.au)
Wed, 1 May 1996 23:34:50 +1000 (EST)


>From include/linux/kernel.h:
#define KERN_EMERG "<0>" /* system is unusable */
#define KERN_ALERT "<1>" /* action must be taken immediately */
#define KERN_CRIT "<2>" /* critical conditions */
#define KERN_ERR "<3>" /* error conditions */
#define KERN_WARNING "<4>" /* warning conditions */
#define KERN_NOTICE "<5>" /* normal but significant condition */
#define KERN_INFO "<6>" /* informational */
#define KERN_DEBUG "<7>" /* debug-level messages */

So informative boot time messages should be KERN_INFO I would imagine, panics
would be EMERG, information about media changes (floppy/cdrom/etc) should
probably be eith KERN_INFO or KERN_DEBUG etc. Shouldn't be too hard to work out
at what level to log something given these guidelines... Also these match the
guidelines for syslog, so if other software follows the guidelines syslogd
should split all messages up appropriately. I would guess that normally INFO
and above should go to the console, maybe NOTICE and above if that is too noisy
(but this can be set through klogd anyway, and will probably turn up in
/proc/sys/kernel soon I bet ;-) )

Enjoy,
David