BIND 10 #1071: introduce "null" output for logs
BIND 10 Development
do-not-reply at isc.org
Mon Jul 4 13:57:28 UTC 2011
#1071: introduce "null" output for logs
-------------------------------------+-------------------------------------
Reporter: | Owner: vorner
jinmei | Status: reviewing
Type: task | Milestone:
Priority: major | Sprint-20110712
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 => vorner
Comment:
> I don't know if I look correctly, but this seems to be more setting-up
of logging options through environment variables. There seems to be no
code regarding any null output. Do I look at a wrong branch or is it
related in some way I don't see?
It adds B10_LOGGER_DESTINATION. Setting that to /dev/null will route the
output to the null device. I've added some text to
[wiki:LoggingCppApiDesign] to describe this and will post a message to
bind10-dev prior to committing #1024 to explain it.
> This doesn't seem to be completely true (the part about "as is", the %1,
etc are replaced): The rest of the line - from the first non-space
character to the last non-space character - is taken exactly as-is for the
text of the message.
I've combined this paragraph and the succeeding one (that talks about the
replacement tokens); does this remove the ambiguity?
> "The main program unit should include a call to isc.log.init()" ‒
wouldn't "must" be better?
Yes - changed.
> Is this a typo or word I don't know? "Checks that the logger will limit
the output of messages less _severy_ than"?
Typo - changed. (And updated test descriptions.)
> In the tests, when the output is routed to stdout or stderr, wouldn't it
be better to use a single pipeline instead of (slower and more error
prone) store-to-file and load again? Like this?:
> B10_LOGGER_SEVERITY=WARN ./init_logger_test 2>&1 | cut -d' ' -f3- | diff
$tempfile -
Where appropriate the tests have been changed to use this construct.
> Also, this looks really strange. Why is the "1" there?
> ./init_logger_test 1> $destfile
For symmetry: the following test a few lines down routes output to stderr
(and so contains a "2>"). The "1>" is meant to emphasise the difference.
--
Ticket URL: <https://bind10.isc.org/ticket/1071#comment:8>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list