BIND 10 #2445: suppress initial log

BIND 10 Development do-not-reply at isc.org
Wed Dec 5 21:08:38 UTC 2012


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

Comment (by jelte):

 In the original code (and the now revised process(), see below); it's not
 initRootLogger that destroys anything, it is
 getDefaultHierarchy().resetConfiguration(), from
 http://log4cplus.sourceforge.net/docs/html/classlog4cplus_1_1Hierarchy.html#aa85b45cef82941012cd1d0f4a8ac89b8
 :
 {{{
 Reset all values contained in this hierarchy instance to their default.

 This removes all appenders from all loggers, sets the LogLevel of all
 non-root loggers to NOT_SET_LOG_LEVEL, sets their additivity flag to
 true and sets the LogLevel of the root logger to DEBUG_LOG_LEVEL.
 Moreover, message disabling is set its default "off" value.

 Existing loggers are not removed. They are just reset.
 }}}
 After that, initRootLogger readds a new stdout to the root logger.

 The problem with calling flush in processInit() is that there is nothing
 to flush to yet :)

 Come to think of it, flushing the logbuffer should to in processEnd(). If
 we want to get rid of the singleton storage, what we *could* do is get all
 known loggers in processInit(), and do getAppender("buffer") on them,
 storing them in a vector of SharedAppenderPtrs, and flush those in
 processEnd() (instead of using the singleton like my last commit does).

 Anyway, I've addressed all the other comments, (commits 1 and 2, except
 for the iostream which is in 3), and did this in the third commit; there
 is still an empty process(), but it simply calls processInit() followed by
 processEnd() (it is no more than a convenience form of the iterator one
 with an empty iterator). The actual processSpecification() implementation
 now no longer needs to do the fragily getRootLogger thing and it also no
 longer needs to care about flushing.

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


More information about the bind10-tickets mailing list