bigboard r7405 - trunk/bigboard/libbig
- From: otaylor svn gnome org
- To: svn-commits-list gnome org
- Subject: bigboard r7405 - trunk/bigboard/libbig
- Date: Wed, 25 Jun 2008 18:30:14 +0000 (UTC)
Author: otaylor
Date: Wed Jun 25 18:30:13 2008
New Revision: 7405
URL: http://svn.gnome.org/viewvc/bigboard?rev=7405&view=rev
Log:
Work around logutil disabling unknown handlers; this means --debug shows everything, and exceptions are always printed without having to find the right debug module
Modified:
trunk/bigboard/libbig/logutil.py
Modified: trunk/bigboard/libbig/logutil.py
==============================================================================
--- trunk/bigboard/libbig/logutil.py (original)
+++ trunk/bigboard/libbig/logutil.py Wed Jun 25 18:30:13 2008
@@ -53,5 +53,12 @@
""" % (module, prefix or "",module)
)
logging.config.fileConfig(StringIO.StringIO(logging_config.getvalue()))
+
+ # After parsing the config, logging disables any loggers that it doesn't
+ # know about, like loggers we created before we initialized logging.
+ # grrr. Reenable them. A different workaround would be to replace
+ # parsing a config file with manual manipulation of loggers and handlers
+ for logger in logging.root.manager.loggerDict.values():
+ logger.disabled = 0
logging.debug("Initialized logging")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]