BIND 10 #2445: suppress initial log

BIND 10 Development do-not-reply at isc.org
Mon Dec 10 23:44:13 UTC 2012


#2445: suppress initial log
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  defect        |  jinmei
            Priority:  medium        |                       Status:
           Component:  Boss of BIND  |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-20121218
         Sub-Project:  Core          |                   Resolution:
Estimated Difficulty:  4             |                 CVSS Scoring:
         Total Hours:  0             |              Defect Severity:  N/A
                                     |  Feature Depending on Ticket:
                                     |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
Changes (by jelte):

 * owner:  jelte => jinmei


Comment:

 Hmm, that's actually slightly tricky, and we have a little bit of a trade-
 off here.

 in createBufferAppender(), I set the logger level to log anything. If this
 isn't done, any level past INFO won't be logged, even if the later config
 says DEBUG (since it has been filtered out already and did not even get to
 the appender).

 But this causes everything to be dumped in case it gets to flushStdout().

 I just considered another approach; storing the initial log level, and
 checking it in flushStdout (normal flush should use the log level of the
 spec it just applied). But then for at least bind10-boss, the DEBUG
 messages wouldn't show up in flushStdout even if -v was given, because
 boss sets the log level of the logger manually, and right now I can't
 think of any way to do this 'right';
 - these two approaches either show too much or too little
 - removing setLogLevel(TRACE) causes debug messages to be dropped in the
 case where -v is *not* given, but the config says DEBUG (that is, the
 messages until process() on the config is first called)
 - storing the *current* loglevel of the logger during append() would also
 not work, since we'd still need to set it to TRACE initially then, which
 would mean the same result as what it originally did (dump too much).

 For now I'm removing the setLogLevel(TRACE), so it will dump DEBUG on -v,
 and not dump them in normal mode, but then, in the -v is not given, and
 working configuration that sets it to DEBUG, some initial DEBUG messages
 get lost....

 Maybe some idea will come to me after some rest, but for now I think we'll
 have to live with that.

-- 
Ticket URL: <http://bind10.isc.org/ticket/2445#comment:28>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list