[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zodb-checkins
Subject:    [Zodb-checkins] CVS: Zope/lib/python/zLOG - datatypes.py:1.14
From:       "Fred L. Drake\, Jr." <fred () zope ! com>
Date:       2003-12-31 20:38:42
Message-ID: 200312312038.hBVKcgTv025599 () cvs ! zope ! org
[Download RAW message or body]

Update of /cvs-repository/Zope/lib/python/zLOG
In directory cvs.zope.org:/tmp/cvs-serv25580

Modified Files:
	datatypes.py 
Log Message:
move more of the handling of log cycling into zLOG, allowing
applications to know less about how this is implemented


=== Zope/lib/python/zLOG/datatypes.py 1.13 => 1.14 ===
--- Zope/lib/python/zLOG/datatypes.py:1.13	Thu Nov  6 02:59:12 2003
+++ Zope/lib/python/zLOG/datatypes.py	Wed Dec 31 15:38:41 2003
@@ -16,6 +16,9 @@
 
 import sys
 
+import zLOG
+
+from zLOG import EventLogger
 from zLOG.factory import Factory
 
 # log-related datatypes
@@ -238,6 +241,18 @@
             if handler_level < lowest:
                 lowest = factory.getLevel()
         return lowest
+
+    def initialize(self):
+        logger = self()
+        for handler in logger.handlers:
+            if hasattr(handler, "reopen"):
+                handler.reopen()
+        EventLogger.event_logger.logger = self()
+
+    def startup(self):
+        zLOG.set_initializer(self.initialize)
+        zLOG.initialize()
+
 
 def importable_name(name):
     try:


_______________________________________________
Zodb-checkins mailing list
Zodb-checkins@zope.org
http://mail.zope.org/mailman/listinfo/zodb-checkins
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic