Author: johannes
Date: 2007-11-07 02:31:52 -0600 (Wed, 07 Nov 2007)
New Revision: 9793
Modified:
trunk/gnue-common/src/apps/GDebug.py
Log:
Remove default error handler, when loggin into debug-file as requested
on the commandline
Modified: trunk/gnue-common/src/apps/GDebug.py
===================================================================
--- trunk/gnue-common/src/apps/GDebug.py 2007-10-02 13:57:46 UTC (rev
9792)
+++ trunk/gnue-common/src/apps/GDebug.py 2007-11-07 08:31:52 UTC (rev
9793)
@@ -229,6 +229,12 @@
__builtin__.__dict__ ['gLeave'] = gLeave
if file is not None:
+ # If the user requested a debug-file on the command line, first
+ # make sure to get rid of all previously installed handlers
+ rlg = logging.getLogger('')
+ while rlg.handlers:
+ rlg.removeHandler(rlg.handlers[0])
+
lgr = logging.getLogger('gnue')
fmt = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
hnd = logging.FileHandler(file, 'a+')
_______________________________________________
commit-gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/commit-gnue