Fix up grampslocale logging a bit.

Send log messages "up the chain", make maclocale a sub-log of grampslocale.
This commit is contained in:
John Ralls 2014-02-20 13:42:38 -08:00
parent c2635cd94b
commit eec3122bfb
2 changed files with 5 additions and 3 deletions

View File

@ -38,7 +38,7 @@ import collections
import logging
LOG = logging.getLogger("." + __name__)
LOG.addHandler(logging.NullHandler())
LOG.propagate = True
HAVE_ICU = False
_hdlr = None
# GrampsLocale initialization comes before command-line argument
@ -558,7 +558,7 @@ class GrampsLocale(object):
if _hdlr:
LOG.removeHandler(_hdlr)
_hdlr = None
self._dd = self._dp = None
#Guards against running twice on the first instance.
self.initialized = True

View File

@ -79,7 +79,9 @@ locale, leaving $LANGUAGE unset (which is the same as setting it to
import sys, os, subprocess, locale
import logging
LOG = logging.getLogger("grampslocale")
LOG = logging.getLogger(".gramps.gen.utils.grampslocale.mac")
LOG.propagate = True
#LOG.setLevel(logging.DEBUG)
def mac_setup_localization(glocale):
"""