Fix up grampslocale logging a bit.
Send log messages "up the chain", make maclocale a sub-log of grampslocale.
This commit is contained in:
parent
daa26b012b
commit
608aca8e65
@ -34,7 +34,7 @@ import codecs
|
|||||||
import locale
|
import locale
|
||||||
import logging
|
import logging
|
||||||
LOG = logging.getLogger("." + __name__)
|
LOG = logging.getLogger("." + __name__)
|
||||||
LOG.addHandler(logging.NullHandler())
|
LOG.propagate = True
|
||||||
HAVE_ICU = False
|
HAVE_ICU = False
|
||||||
_hdlr = None
|
_hdlr = None
|
||||||
# GrampsLocale initialization comes before command-line argument
|
# GrampsLocale initialization comes before command-line argument
|
||||||
@ -549,7 +549,7 @@ class GrampsLocale(object):
|
|||||||
|
|
||||||
if _hdlr:
|
if _hdlr:
|
||||||
LOG.removeHandler(_hdlr)
|
LOG.removeHandler(_hdlr)
|
||||||
|
_hdlr = None
|
||||||
self._dd = self._dp = None
|
self._dd = self._dp = None
|
||||||
#Guards against running twice on the first instance.
|
#Guards against running twice on the first instance.
|
||||||
self.initialized = True
|
self.initialized = True
|
||||||
|
@ -79,7 +79,9 @@ locale, leaving $LANGUAGE unset (which is the same as setting it to
|
|||||||
|
|
||||||
import sys, os, subprocess, locale
|
import sys, os, subprocess, locale
|
||||||
import logging
|
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):
|
def mac_setup_localization(glocale):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user