Hi all,

I'm currently working on adding structured kernel logging into imklog module. 
First brief and devel code is at 
https://github.com/mbartos89/rsyslog_changes/commits/imklog, a lot of code will 
probably change.
Structured format is described at 
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=kernel/printk.c;h=1ccc6d986cb391e0d0be4aced844231004460ff1;hb=e11fea92e13fb91c50bacca799a6131c81929986
 around line 130.
Information are exported in /dev/kmsg and the first line of each record looks 
like:
"level,sequnum,timestamp;<message text>\n". According to comment from link 
above, level is e.g. LOG_ERR and that should be the syslog level/severity 
(According to Syslog, levels are from 0 (for emergency) to 7 (debug)).
However some messages have level over 7 (e.g. 46 as you can see vvv)
-- log --
        7,882,14331700;SELinux: initialized (dev autofs, type autofs), uses 
genfs_contexts
        30,883,15748739;udevd[473]: starting version 182
        46,884,16534294;systemd-journald[468]: Fixed max_use=393.4M 
max_size=49.1M min_size=64.0K keep_free=196.7M
        46,885,16534592;systemd-journald[468]: Vacuuming...
-- end of log --

My question is: Can i assign this levels to iSeverity of variable of type msg_t 
(in rsyslog) even when theese are not between 0 and 7?
Or could level in kernel log be different that the syslog levels (LOG_ERR)?
Or am I completely wrong?

Thanks a lot
Milan Bartos
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards

Reply via email to