BIND 10 #1704: log output mixed
BIND 10 Development
do-not-reply at isc.org
Fri Apr 20 18:31:24 UTC 2012
#1704: log output mixed
-------------------------------------+-------------------------------------
Reporter: jreed | Owner: stephen
Type: | Status: reopened
defect | Milestone:
Priority: | Sprint-20120501
medium | Resolution:
Component: | Sensitive: 0
logging | Sub-Project: Core
Keywords: | Estimated Difficulty: 15
Defect Severity: N/A | Total Hours: 0
Feature Depending on Ticket: |
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Comment (by stephen):
I'm not certain that's an exact comparison with the logging output.
If line flushing is enabled, log4cplus appears to call ostream::flush() to
flush the buffer after writing each line. printf() does not flush its
buffer even if you terminate the string with "\n". To get the same
behaviour as log4cplus with line flushing enabled, you would need to call
fflush(stdout) after each printf().
Having said that, we are assuming that each underlying call to write(2) to
the console cannot interrupt another call to write(2) made by a different
process (which may be running at the same time on a multi-core system).
I've not managed to find anything that guarantees this.
> If multiple processes have to write legibly to a single output, we will
have to use some sort of locking or have a logging server.
I think locking and unlocking a single BIND10-wide mutex would be the
easiest.
--
Ticket URL: <http://bind10.isc.org/ticket/1704#comment:24>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list