BIND 10 #1189: log output to console buffering
BIND 10 Development
do-not-reply at isc.org
Thu Aug 25 08:46:08 UTC 2011
#1189: log output to console buffering
-------------------------------------+-------------------------------------
Reporter: jreed | Owner:
Type: | Status: new
defect | Milestone: Next-Sprint-
Priority: minor | Proposed
Component: | Resolution:
logging | Sensitive: 0
Keywords: | Sub-Project: Core
Defect Severity: Low | Estimated Difficulty: 0
Feature Depending on Ticket: | Total Hours: 0
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Changes (by shane):
* severity: N/A => Low
* milestone: New Tasks => Next-Sprint-Proposed
Comment:
For stdout, most programs do line buffering if going to a console or block
buffering if going to a file. This is the default for C, C++, Python,
Perl, and so on. Some programs have options to change this, for example in
tcpdump:
{{{
-l Make stdout line buffered. Useful if you want to see the
data
while capturing it. E.g.,
``tcpdump -l | tee dat'' or ``tcpdump -l
>
dat & tail -f dat''.
}}}
Anyway, we can ask the C++ standard output to buffer after each write,
like this:
{{{
#!cpp
cout << unitbuf;
}}}
You can read a bit more about it on the C++ reference page:
http://www.cplusplus.com/reference/iostream/manipulators/unitbuf/
It's a one-line fix, but I'm not sure the right place for that one line.
:)
--
Ticket URL: <http://bind10.isc.org/ticket/1189#comment:1>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list