BIND 10 #976: Add syslog appender to logging code
BIND 10 Development
do-not-reply at isc.org
Wed Jun 8 18:22:23 UTC 2011
#976: Add syslog appender to logging code
-------------------------------------+-------------------------------------
Reporter: | Owner: jelte
stephen | Status: reviewing
Type: task | Milestone:
Priority: major | Sprint-20110614
Component: | Resolution:
logging | Sensitive: 0
Keywords: | Sub-Project: DNS
Defect Severity: N/A | Estimated Difficulty: 0.0
Feature Depending on Ticket: | Total Hours: 0
Add Hours to Ticket: 0 |
Internal?: 0 |
-------------------------------------+-------------------------------------
Changes (by stephen):
* owner: stephen => jelte
Comment:
> ... I saw two more but did not know exactly what to make of it;
'disction' on line 70 (i assume it is supposed to say dictionary, but i'm
not sure), and the sentence on line 82 does not seem to have been finished
(... using.)
It was supposed to be "dictionary" :-( I've also updated the incomplete
sentence.
> Code itself looks good. I do have one bikesheddy comment, and that may
be personal preference; I tend to view 'syslog' as one name of a system
for logging. As such, my !CamelCasing would be Syslog, not !SysLog.
I put it as !SysLog to match the variant of the name used in log4cplus.
However, I agree with you and have changed it to "Syslog".
> And finally, a question; do we think we can make our test shellscripts
not print the actual log messages themselves?
Done. The console tests route unneeded output to /dev/null and the
logger_example program build for their use is now defined in Makefile.am
by the variable check_PROGRAMS instead of TESTS (so does not execute when
built).
As the output now does not include log messages, I've compacted it - the
pass/fail result of a test is now shown on the same line as the title of
the test itself.
> (i've been meaning to make the rest of the tests 'disable' logs
completely, I really don't want to see ERROR and WARN etc unless there is
something wrong. Of course we need to trigger that said messages are
logged, but if possible, I'd like to not show them).
Difficult, as how do you distinguish between a test that is failing and
hence shows a message, and a test for a failure condition that has passed
but in doing so generates a message?
I've altered the call to initLogger() so that it now takes as argument the
output severity level of the logging system (defaults to INFO, the current
setting), so it is now possible to set the default severity for a unit
test by passing the appropriate severity to initLogger() in main().
Whatever setting is used, it is possible to override it by setting the
environment variable B10_LOGGER_SEVERITY before running the test. As
logger_level.cc has been updated to recognise "NONE", it is now possible
to suppress logging output entirely.
A few other changes whilst tinkering around with this part of the code:
* I've corrected a problem whereby the severity passed to
LoggerManager::init() was not getting passed to the implementation class
(reported by Michal in the Jabber room)
* I've added a missing getEffectiveDebugLevel() method to !LoggerManager.
* All the logging unit tests now use the same root logger (so can have
their severity output controlled by B10_LOGGER_SEVERITY) and reset the
logging configuration correctly when they exit.
--
Ticket URL: <http://bind10.isc.org/ticket/976#comment:8>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list