BIND 10 #736: Implement logging configuration

BIND 10 Development do-not-reply at isc.org
Mon Jun 6 15:20:58 UTC 2011


#736: Implement logging configuration
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:  UnAssigned
  stephen                            |                Status:  reviewing
                       Type:         |             Milestone:
  enhancement                        |  Sprint-20110614
                   Priority:         |            Resolution:
  critical                           |             Sensitive:  0
                  Component:         |           Sub-Project:  DNS
  logging                            |  Estimated Difficulty:  7.0
                   Keywords:         |           Total Hours:  0
            Defect Severity:  N/A    |
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Changes (by jelte):

 * owner:  jelte => UnAssigned
 * status:  assigned => reviewing


Comment:

 ready for review, trac736.

 some notes:

 I've made ModuleCCSession so that it automatically tracks logging
 configuration (so modules don't have to do this themselves, they do have
 to tell ModuleCCSession to do so with a boolean in its constructor,
 b10-resolver now does this).

 We seem to be missing a bit of functionality in the C++ part of
 configuration data classes; for one i've created a ticket (993, direct
 list element addressing), and another i want to think a bit about (i would
 really like to have access to a specific part of the specification from a
 single configuration value; now we have to traverse the specification tree
 from the base).  But even without this is all possible, as implemented in
 the added code to ccsession.cc, just a bit awkward.

 I did change the callback argument footprint to addRemoteConfig; it also
 needs the ConfigData element (so that it can get to the defaults), updated
 in the other places where this was called.

 I also updated a bit of code in config_data; I ran into a few bugs when
 implementing this (it actually got some wrong data in some cases), and
 refactored the function that had gotten a bit long.


 Example configuration session (assumes Boss is already set up so that it
 is running the resolver, not auth):
 {{{
 > ./src/bin/bindctl/run_bindctl.sh
 ["login success "] login as root
 > config show Logging
 Logging/loggers []      list    (default)
 > config add Logging/loggers
 > config show all Logging
 Logging/loggers[0]/name ""      string  (default)
 Logging/loggers[0]/severity     "INFO"  string  (default)
 Logging/loggers[0]/debuglevel   0       integer (default)
 Logging/loggers[0]/additive     false   boolean (default)
 Logging/loggers[0]/output_options       []      list    (default)
 > config set Logging/loggers[0]/name b10-resolver
 > config set Logging/loggers[0]/debuglevel DEBUG
 Error: DEBUG is not an integer
 > config set Logging/loggers[0]/severity DEBUG
 > config set Logging/loggers[0]/debuglevel 999
 > config add Logging/loggers[0]/output_options
 > config show Logging/loggers[0]/output_options
 Logging/loggers[0]/output_options[0]/destination        "console"
 string  (default)
 Logging/loggers[0]/output_options[0]/stream     "stdout"        string
 (default)
 Logging/loggers[0]/output_options[0]/flush      false   boolean (default)
 Logging/loggers[0]/output_options[0]/facility   ""      string  (default)
 Logging/loggers[0]/output_options[0]/filename   ""      string  (default)
 Logging/loggers[0]/output_options[0]/maxsize    0       integer (default)
 Logging/loggers[0]/output_options[0]/maxver     0       integer (default)
 > config set Logging/loggers[0]/output_options[0]/destination file
 > config set Logging/loggers[0]/output_options[0]/filename /tmp/bind10.log
 > config commit
 >
 }}}

 Note that due to a bug in the current bindctl, you can only use 'add' to
 add a clean item to an existing list if the last item you added has been
 changed in any way (i don't remember if i had already created a ticket for
 that but i will if not)

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


More information about the bind10-tickets mailing list