Commit 3be3be21 authored by Chris McDonough's avatar Chris McDonough

Collector 1112: logfile reopen didn't.

parent 3906b7ed
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
""" """
Zope signal handlers for clean shutdown, restart and log rotation. Zope signal handlers for clean shutdown, restart and log rotation.
$Id: Signals.py,v 1.1 2002/11/25 19:25:41 chrism Exp $ $Id: Signals.py,v 1.2 2003/11/12 20:42:22 chrism Exp $
""" """
__version__='$Revision: 1.1 $'[11:-2] __version__='$Revision: 1.2 $'[11:-2]
from SignalHandler import SignalHandler from SignalHandler import SignalHandler
import zLOG import zLOG
...@@ -44,17 +44,11 @@ def restartHandler(): ...@@ -44,17 +44,11 @@ def restartHandler():
def logfileReopenHandler(): def logfileReopenHandler():
"""Reopen log files on SIGUSR2. This is registered first, so it """Reopen log files on SIGUSR2. This is registered first, so it
should be called after all other SIGUSR2 handlers.""" should be called after all other SIGUSR2 handlers."""
zLOG.LOG('Z2', zLOG.INFO , "Reopening log files") from zLOG.EventLogger import event_logger
reopen = getattr(getattr(sys, '__lg', None), 'reopen', None) from ZServer.AccessLogger import access_logger
if reopen is not None: from ZServer.DebugLogger import debug_logger
reopen() for logger in (event_logger, access_logger, debug_logger):
zLOG.LOG('Z2', zLOG.BLATHER, "Reopened access log") logger.reopen()
reopen = getattr(getattr(sys, '__detailedlog', None), 'reopen', None)
if reopen is not None:
reopen()
zLOG.LOG('Z2', zLOG.BLATHER,"Reopened detailed request log")
zLOG.initialize()
zLOG.LOG('Z2', zLOG.BLATHER, "Reopened event log")
zLOG.LOG('Z2', zLOG.INFO, "Log files reopened successfully") zLOG.LOG('Z2', zLOG.INFO, "Log files reopened successfully")
def packHandler(): def packHandler():
......
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