BIND 10 #1394: unify format_zone_str and format_addrinfo

BIND 10 Development do-not-reply at isc.org
Sat Jun 9 16:39:29 UTC 2012


#1394: unify format_zone_str and format_addrinfo
-------------------------------------+-------------------------------------
                   Reporter:         |                 Owner:
  jinmei                             |                Status:  new
                       Type:         |             Milestone:  Next-Sprint-
  enhancement                        |  Proposed
                   Priority:         |            Resolution:
  medium                             |             Sensitive:  0
                  Component:         |           Sub-Project:  Core
  logging                            |  Estimated Difficulty:  2
                   Keywords:         |           Total Hours:  0
            Defect Severity:  N/A    |
Feature Depending on Ticket:         |
        Add Hours to Ticket:  0      |
                  Internal?:  0      |
-------------------------------------+-------------------------------------
Description changed by jinmei:

Old description:

> 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))
> }}}

New description:

 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))
 }}}

 ddns.logger.py defines `ClientFormatter` and `ZoneFormatter`.  These
 should be unified, too.

--

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


More information about the bind10-tickets mailing list