[Zodb-checkins] CVS: ZODB3/zLOG - EventLogger.py:1.8.6.3
datatypes.py:1.10.16.3
Jeremy Hylton
jeremy at zope.com
Fri Sep 19 17:16:55 EDT 2003
Update of /cvs-repository/ZODB3/zLOG
In directory cvs.zope.org:/tmp/cvs-serv13624/zLOG
Modified Files:
Tag: Zope-2_7-branch
EventLogger.py datatypes.py
Log Message:
Restore code deleted by the merge of ZODB3-3_2-branch.
=== ZODB3/zLOG/EventLogger.py 1.8.6.2 => 1.8.6.3 ===
--- ZODB3/zLOG/EventLogger.py:1.8.6.2 Mon Sep 15 14:02:56 2003
+++ ZODB3/zLOG/EventLogger.py Fri Sep 19 17:16:49 2003
@@ -44,12 +44,6 @@
level = (zlog_to_pep282_severity_cache_get(severity) or
zlog_to_pep282_severity(severity))
- # Try an early exit if the logger is disabled for this level.
- # (XXX This inlines logger.isEnabledFor(level).)
- if (self.logger.manager.disable >= level or
- level < self.logger.getEffectiveLevel()):
- return
-
msg = "%s %s %s" % (
severity_string_cache_get(severity) or severity_string(severity),
subsystem,
=== ZODB3/zLOG/datatypes.py 1.10.16.2 => 1.10.16.3 ===
--- ZODB3/zLOG/datatypes.py:1.10.16.2 Mon Sep 15 14:02:56 2003
+++ ZODB3/zLOG/datatypes.py Fri Sep 19 17:16:49 2003
@@ -97,6 +97,9 @@
logger.setLevel(self.section.level)
return logger
+ def getLevel(self):
+ return self.section.level
+
class FileHandlerFactory(HandlerFactory):
def create_loghandler(self):
from zLOG.LogHandlers import StreamHandler, FileHandler
@@ -224,3 +227,14 @@
from zLOG.LogHandlers import NullHandler
logger.addHandler(NullHandler())
return logger
+
+ def getLowestHandlerLevel(self):
+ """ Return the lowest log level provided by any of our handlers
+ (used by Zope startup logger code to decide what to send
+ to stderr during startup) """
+ lowest = self.level
+ for factory in self.handler_factories:
+ handler_level = factory.getLevel()
+ if handler_level < lowest:
+ lowest = factory.getLevel()
+ return lowest
More information about the Zodb-checkins
mailing list