BIND 10 #2746: allow loading log messages manually and use it for Python datasrc

BIND 10 Development do-not-reply at isc.org
Wed Mar 6 13:55:00 UTC 2013


#2746: allow loading log messages manually and use it for Python datasrc
-------------------------------------+-------------------------------------
            Reporter:  jinmei        |                        Owner:
                Type:  defect        |  vorner
            Priority:  medium        |                       Status:
           Component:  logging       |  reviewing
            Keywords:                |                    Milestone:
           Sensitive:  0             |  Sprint-20130319
         Sub-Project:  Core          |                   Resolution:
Estimated Difficulty:  5             |                 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 => vorner


Comment:

 Replying to [comment:7 vorner]:
 > Hello
 >
 > It seems you forgot to add the `sqlite3_datasrc_messages.mes` to git,
 both distcheck and compilation complain about it.
 >

 oops. Done.

 > I think the `ignore_duplicates` parameter should be documented, also
 noting it'll clear all previous duplicates stored.
 >

 of course

 > A documentation of MessageInitializer class may need to be updated to
 note when it is being used from dynamically loaded module, it might be
 needed to call the `loadDictionary()`.
 >

 added something to that effect

 > Also, I believe the whole exercise with the dictionaries was done so the
 log messages can be translated and the messages then replaced by newer
 dictionaries. But this kind of breaks it IMO (not that we would be doing
 so, though). It would now look like this:
 >  * Initialize the english built-in dictionaries.
 >  * Load translations to override the already loaded messages.
 >  * Load something from dynamic module. This'll override messages for
 that module that were supplied with the translated module.
 >

 AFAIK, if the messages are loaded, another call to load should not have
 any effect, load should only store unknown ones. So while this comment
 does lead me to think this solution may not be complete (or rather, that
 we are missing something to get translations right, but I don't think we
 make any use outside of tests of that anyway, do we?), i don't think it
 should cause any regressions to that effect atm.

 > Also, changelog?

 ohright, wasn't sure actually (since the bug that exposed this hadn't made
 it to releases yet).

 [bug] jelte
 When used from python, the dynamic datasource factory now explicitely
 loads the logging messages dictionary, so that correct logging messages
 does not depend on incidental earlier import statements. Also, the
 sqlite3-specific log messages have been moved from the general datasource
 library to the sqlite3 datasource (which also explicitely loads its
 messages).
 (Trac 2467, git X)

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


More information about the bind10-tickets mailing list