[RFC] make bb_[p]error_msgXXXX() functions able to direct output to syslog

Bernhard Fischer rep.nop at aon.at
Sun Sep 3 13:52:52 UTC 2006


On Sun, Sep 03, 2006 at 02:39:55PM +0200, Denis Vlasenko wrote:
>Hi,
>
>I worked on zcip (http://bugs.busybox.net/view.php?id=1005)
>and in the process I fixed inconsistent use of syslog and bb_[p]error
>functions.

>The solution which seems ok to me is to make bb_[p]error
>syslog aware. That is, we need a global flag variable which
>says "direct all bb_[p]error output to syslog (because
>we are daemonized and there is no usable stdout/err)"
>
>Minor problem is how to select syslog level, but it isn't
>that serious.
>
>Any objections?

No objection from my part. It would be nice if we can optionally feed
the messages to both syslog and stderr. Recently a tee() was added in
linux, so it would be nice if we could optionally use that
infrastructure for the case where we want errors to go both to syslog
and stderr.

Thoughts?



More information about the busybox mailing list