Log Upstart messages to kmsg rather than syslog

Eric House eehouse at eehouse.org
Tue Feb 8 18:05:24 UTC 2011


On Mon, Feb 07, 2011 at 02:13:18PM -0800, Scott James Remnant wrote:
> 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
> system logging:
> 
>  - 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.

Why not make it compile-time, or even runtime, option?

Most of the time I want the messages in syslog so they're inline with
other events happening (often causing or resulting from upstart events
as daemons are fired or killed), but occasionally I want them in the
kernel buffers -- e.g. when debugging a problem that kills the device
before syslogd is started.

--Eric
-- 
******************************************************************************
* From the desktop of: Eric House, eehouse at eehouse.org                       *
*       Crosswords for Android now in beta: via the Market or xwords.sf.net  *
******************************************************************************



More information about the upstart-devel mailing list