emit loglevel for printk output
Hi,
I propose a character before each logged line so that one can easily grep through dmesg output for errors/warnings/etc.
It's just a suggestion, maybe there are better ways. E.g. iirc openbsd uses colors.
errors/criticals/fatals: -
warnings: !
debugging: #
info: +
Signed-off: folkert van heusden <[email protected]>
kernel/printk.c renamed from kernel/printk.c.org +10 -0
@@ -730,6 +730,16 @@ printed_len +=3 ; new_text_line =0 ; +if (current_log_level <= (KERN_ERR [1 ] -'0' )) +emit_log_char ('-' ); +else if (current_log_level == (KERN_WARNING [1 ] -'0' )) +emit_log_char ('!' ); +else if (current_log_level == (KERN_DEBUG [1 ] -'0' )) +emit_log_char ('#' ); +else +emit_log_char ('+' ); +emit_log_char (' ' ); +if (printk_time) {/* Follow the token with the time */ char tbuf[50 ], *tp;
Folkert van Heusden
Signature · 4 lines
Ever wonder what is out there? Any alien races? Then please support the seti@home project: setiathome.ssl.berkeley.edu ---------------------------------------------------------------------- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com