Log Upstart messages to kmsg rather than syslog

James Hunt james.hunt at canonical.com
Thu Feb 10 09:36:03 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/02/11 18:08, Scott James Remnant wrote:
> Runtime option could certainly work, we could use the kernel
> command-line to pass it:
> 
>   quiet splash init.log=syslog
> 
> or something?
+1, although maybe we should choose an alternative separator to avoid
any possible collision with the module namespace (one day someone is
bound to create an 'init.ko' :-)

Maybe ':' giving, "init:log=syslog" instead?

Cheers,

James.

> 
> Scott
> 
> On Tue, Feb 8, 2011 at 10:05 AM, Eric House <eehouse at eehouse.org> wrote:
>> 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  *
>> ******************************************************************************
>>
>

- --
James Hunt
____________________________________
Ubuntu Foundations Team, Canonical.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk1TsXwACgkQYBWEaHcQG9eyVACfXXUhNXVkEJJMNL2t1ORcIPo9
3+cAnAz49kjxHFcgI0TmHkMAcwSlWeYp
=vvgM
-----END PGP SIGNATURE-----



More information about the upstart-devel mailing list