Commit 133884f0 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 1a6e7b92
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
import sys import sys
import zLOG
from zLOG import EventLogger
from zLOG.factory import Factory from zLOG.factory import Factory
# log-related datatypes # log-related datatypes
...@@ -239,6 +242,18 @@ class EventLogFactory(Factory): ...@@ -239,6 +242,18 @@ class EventLogFactory(Factory):
lowest = factory.getLevel() lowest = factory.getLevel()
return lowest 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): def importable_name(name):
try: try:
components = name.split('.') 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