[bind10-dev] Ticket 1704 (Log output mixed)

Shane Kerr shane at isc.org
Wed Apr 11 11:58:48 UTC 2012


Stephen,

On Tuesday, 2012-04-10 14:17:07 +0100,
Stephen Morris <stephen at isc.org> wrote:
> The question is, what to do about it, which is why I've posted to the
> list:
> 
> 1) The simplest solution is not to log to stderr, but to log to
> stdout. The only question is whether to make logging to stdout the
> default.
> 
> 2) Enabling buffering for cerr (as suggested on the ticket).  I'm not
> certain whether it is possible to add a buffer to an object that is
> not expecting one (cerr might be optimised to ignore any associated
> buffers).  But in any case, the characteristic of cerr is that it is
> unbuffered and enabling buffering might cause problems later on.
> 
> 3) Finally, we can report the issue to the log4cplus maintainer and
> ask that the code be altered to ensure that the message written to
> stderr is written in one write call.

Just for completeness, there is also:

4) Start each program with stdout/stderr directed to pipes (or
pseudo-terminals), and then have an application (possibly the boss,
possibly not) line buffer output it receives from there.
 
> I suggest that we do (1) (and take the opportunity to make output to
> stdout the default) and (3).

I agree. It should not be a surprise to any user that output of a
program goes to the standard output. :)

--
Shane


More information about the bind10-dev mailing list