Log Upstart messages to kmsg rather than syslog
Scott James Remnant
scott at netsplit.com
Mon Feb 7 22:13:18 UTC 2011
Attached is a patch that changes the Upstart log target from syslog to
the kernel message pipe, prefixing with an appropriate tag so that the
kernel log message settings take effect. This has a few benefits over
- kmsg is buffered, so "dmesg" will include init's messages
- most setups take the buffer contents, write it to a "kern.log", and
then continue to append additional messages as they appear - so you
get the best of both worlds
- high priority messages end up on console
- if you boot without "quiet", low-priority messages should also end
up on the console
So there's a lot of win here. I know that Laszlo has asked for this.
The downside is obviously that init's messages are now mixed in with
the kernel rather than the daemon messages.
I'd like to propose this change for future major Upstart releases, so
would like feedback (if any) to the mailing list.
There's a possible mid-ground too, which would be to send to kmsg if
syslog isn't available, but I think that needlessly splits messages
across far too many sources and makes them hard to collate (and there
may be formatting differences, etc.)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1977 bytes
Desc: not available
More information about the upstart-devel