[Zope-Checkins] CVS: Zope/lib/python/Signals - Signals.py:1.2.4.10
Chris McDonough
chrism@zope.com
Sun, 3 Nov 2002 18:31:29 -0500
Update of /cvs-repository/Zope/lib/python/Signals
In directory cvs.zope.org:/tmp/cvs-serv4615/lib/python/Signals
Modified Files:
Tag: chrism-install-branch
Signals.py
Log Message:
New logging regime. Use PEP 282 logging facility and section in config file for its configuration for access, event, and trace logs.
=== Zope/lib/python/Signals/Signals.py 1.2.4.9 => 1.2.4.10 ===
--- Zope/lib/python/Signals/Signals.py:1.2.4.9 Fri Nov 1 07:51:14 2002
+++ Zope/lib/python/Signals/Signals.py Sun Nov 3 18:31:28 2002
@@ -38,19 +38,15 @@
def logfileReopenHandler():
"""Reopen log files on SIGUSR2. This is registered first, so it
should be called after all other SIGUSR2 handlers."""
+ from zLOG.AccessLogger import AccessLogger
+ from zLOG.DebugLogger import DebugLogger
+ from zLOG.EventLogger import EventLogger
zLOG.LOG('Z2', zLOG.INFO , "Reopening log files")
- reopen = getattr(getattr(sys, '__lg', None), 'reopen', None)
- if reopen is not None:
- reopen()
- zLOG.LOG('Z2', zLOG.BLATHER, "Reopened access log")
- reopen = getattr(getattr(sys, '__detailedlog', None), 'reopen', None)
- if reopen is not None:
- reopen()
- zLOG.LOG('Z2', zLOG.BLATHER,"Reopened detailed request log")
- if hasattr(zLOG, '_set_stupid_dest'):
- zLOG._set_stupid_dest(None)
- else:
- zLOG._stupid_dest = None
+ AccessLogger.reopen()
+ zLOG.LOG('Z2', zLOG.BLATHER, "Reopened access log")
+ DebugLogger.reopen()
+ zLOG.LOG('Z2', zLOG.BLATHER,"Reopened detailed request log")
+ EventLogger.reopen()
zLOG.LOG('Z2', zLOG.BLATHER, "Reopened event log")
zLOG.LOG('Z2', zLOG.INFO, "Log files reopened successfully")