Commit 5d8761de authored by Fred Drake's avatar Fred Drake

move more of the handling of log cycling into zLOG, allowing

applications to know less about how this is implemented
parent 15fe677b
......@@ -16,6 +16,9 @@
import sys
import zLOG
from zLOG import EventLogger
from zLOG.factory import Factory
# log-related datatypes
......@@ -239,6 +242,18 @@ class EventLogFactory(Factory):
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:
components = name.split('.')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment