[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[minion-cvs] Fail earlier on badly-formatted log messages
Update of /home/minion/cvsroot/src/minion/lib/mixminion
In directory moria.seul.org:/tmp/cvs-serv10443/lib/mixminion
Modified Files:
Common.py
Log Message:
Fail earlier on badly-formatted log messages
Index: Common.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/Common.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- Common.py 21 Nov 2002 16:55:49 -0000 1.24
+++ Common.py 22 Nov 2002 00:15:07 -0000 1.25
@@ -310,12 +310,18 @@
self._log(severity, message, args)
def _log(self, severity, message, args):
- if _SEVERITIES.get(severity, 100) < self.severity:
- return
+ # Enable this block to bail early in production versions
+ #if _SEVERITIES.get(severity, 100) < self.severity:
+ # return
if args is None:
m = message
else:
m = message % args
+
+ # Enable this block to debug message formats.
+ if _SEVERITIES.get(severity, 100) < self.severity:
+ return
+
for h in self.handlers:
h.write(severity, m)