That's a good point. If people still want colourization, however, the
tags method ought to work, requires no intelligence up until the
syslogger point.
In the kernel you make a call like printk(KERN_WARN"<GREEN> foo
starting\n"), nothing technically needs to handle this. If the final
logging entity *knows* we are running on a standard on-board vga
console, in can translate the extra tags into the correct escape
sequences with little extra cost. You could even customize an xconsole
to do the same (although it probably wouldn't need it - doesn't it
just run through a normal xterm, which could be a colour_xterm and use
the regular sequences). Anyway the point is you can enable just about
any end application to support colourization in the correct way,
portably, by using tags, whereas embedded escape sequences are in a
lot of cases a Bad Thing.
If the output device happens not to be capable of using the extra
info, it can be stripped out fairly painlessly also (you wouldn't even
need a temporary string buffer). I would recommend doing this for all
tags in file-logs anyway, having even <6>s or whatever spattered
through the logs can be annoying sometimes, especially since I haven't
quite memorized all the level codes. And this saves space - I assume
non-vga-console consoles are more likely to have a higher screen
real-estate cost (my vga console boots in 80x50, then switches to
136x55 as soon as it can - I'm working on getting it to boot in
136x55).
John
-- i built it up now i take it apart climbed up real high now fall down real far no need for me to stay the last thing left i just threw it away i put my faith in god and my trust in you now there's nothing more fucked up i could do <p><a href="file:///dev/null">Me.</a>