[PATCH/RFC] teach bb_xx_msg to optionally send msgs to syslog

Denis Vlasenko vda.linux at googlemail.com
Wed Sep 6 17:24:03 UTC 2006


On Tuesday 05 September 2006 14:49, Tito wrote:
> Hi,
> attached is a patch to add facility support to logging
> so that logs can be sorted
> and to ensure that the applet's name and pid  is always in the log
> because if you start the programs as
> 
> ./busybox sulogin
> ./busybox someapp
> 
> all will be logged as busybox

Wow.... so these are not using explicit openlog?

> and this makes the logs difficult to read. 
> I tested it with my sulogin shrinkage patch and it works fine

> before:
> Sep  5 14:15:03 localhost busybox: Normal startup
> after:
> Sep  5 14:24:44 localhost sulogin[9677]: Normal startup

Well, having openlog/closelog on every single message is kind
of not very nice, but tolerable. However, it also _forces_ all_ applets_
to use applet_name[pid] notation. What if some applets don't want [pid]?
Or don't want LOG_CONS?

I thought that having openlog done by applet's main() is okay
(and most syslog-capable applets already have this, I think).

> PS: Rob told me to send the patches that move apps to this new system
> 	to you to be committed. I think to do sulogin, su and devfsd.
> 	Is it ok for you?

Sure.

I see no serious objections to these patches. Wow.
Maybe I should commit them...
--
vda



More information about the busybox mailing list