BIND 10 #1394: unify format_zone_str and format_addrinfo

BIND 10 Development do-not-reply at isc.org
Sun Nov 20 19:44:04 UTC 2011


#1394: unify format_zone_str and format_addrinfo
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  enhancement   |                       Status:  new
            Priority:  major         |                    Milestone:  Next-
           Component:  logging       |  Sprint-Proposed
           Sensitive:  0             |                     Keywords:
         Sub-Project:  Core          |              Defect Severity:  N/A
Estimated Difficulty:  0             |  Feature Depending on Ticket:
         Total Hours:  0             |          Add Hours to Ticket:  0
                                     |                    Internal?:  0
-------------------------------------+-------------------------------------
 These were introduced in xfrin and subsequently copied to xfrout and
 notify_out.  They should be moved to some utility library and applications
 should refer to it.

 Also, in the sense of a note in #1393, I'd suggest making this classes:

 {{{#!Python
 class ZoneFormatter:
     def __init__(self, zone_name, zone_class):
         self.__zone_name = zone_name
         self.__zone_class = zone_class

     def __str__(self):
         return self.__zone_name.to_text(True) + '/' +
 str(self.__zone_class)
 }}}

 And the applicaton pass Formatter objects to logger:

 {{{
     logger.debug(VERY_MINOR, SOME_NOISY_LOG, ZoneFormatter(zname, zclass))
 }}}

-- 
Ticket URL: <http://bind10.isc.org/ticket/1394>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development


More information about the bind10-tickets mailing list