BIND 10 #1189: log output to console buffering

BIND 10 Development do-not-reply at isc.org
Mon Aug 22 14:35:43 UTC 2011


#1189: log output to console buffering
--------------------------------+-----------------------------------------
            Reporter:  jreed    |                        Owner:
                Type:  defect   |                       Status:  new
            Priority:  minor    |                    Milestone:  New Tasks
           Component:  logging  |                     Keywords:
           Sensitive:  0        |              Defect Severity:  N/A
         Sub-Project:  Core     |  Feature Depending on Ticket:
Estimated Difficulty:  0        |          Add Hours to Ticket:  0
         Total Hours:  0        |                    Internal?:  0
--------------------------------+-----------------------------------------
 I was capturing stderr and stdout (tee'd into a file). After I enabled
 debug 100. And then did a tail of my output, no change. Then I did the dig
 resulting in a SERVFAIL and then my output suddenly had all the output
 over the past  5+ hours. Also sometimes log output wasn't complete (like
 no newline). So some buffering problems when outputting to stdout or
 stderr.

 The following is from jabber:

 (05:48:33) stephen: I've had a very quick look at the log4cplus code and
 it appears logging output to the console ultimately ends up as a standard
 C++ call, something along the lines of "cerr << text".

 (05:49:31) stephen: So if there are problems with flushing buffers and the
 like,  it points to a problem in the C++ library on that system.  What
 operating system did these problems occur on?

 (05:49:43) jreed: I am surprised I needed to set flush to true. Not useful
 default for this.

 (05:49:58) jreed: This is on Debian Linux. (git.bind10.isc.org)

 (05:50:21) stephen: Hmm...

 (05:50:59) stephen: AFAIK, when logging to stderr you should not have to
 flush after each write, it is done for you.

 (05:51:34) jreed: The default is stdout.

 (05:51:59) jreed: If changing that fixes it, then that is fine. But too
 many things to change already.

 (05:52:14) stephen: Perhaps we ought to make stderr the default.

-- 
Ticket URL: <http://bind10.isc.org/ticket/1189>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list