Log message for revision 41195:
  zLOG -> logging

Changed:
  U   Zope/trunk/lib/python/Signals/SignalHandler.py

-=-
Modified: Zope/trunk/lib/python/Signals/SignalHandler.py
===================================================================
--- Zope/trunk/lib/python/Signals/SignalHandler.py      2006-01-08 10:28:31 UTC 
(rev 41194)
+++ Zope/trunk/lib/python/Signals/SignalHandler.py      2006-01-08 10:30:04 UTC 
(rev 41195)
@@ -16,8 +16,11 @@
 __version__='$Revision: 1.2 $'[11:-2]
 
 import sys, os
-import signal, zLOG
+import signal
+from logging import getLogger
 
+LOG = getLogger('SignalHandler') 
+
 class SignalHandler:
 
     def __init__(self):
@@ -36,9 +39,7 @@
             items = self.registry[signum] = []
             signal.signal(signum, self.signalHandler)
             signame = get_signal_name(signum)
-            zLOG.LOG('Z2', zLOG.BLATHER, "Installed sighandler for %s" % (
-                      signame
-                      ))
+            LOG.debug("Installed sighandler for %s" % signame)
         items.insert(0, handler)
 
     def getRegisteredSignals(self):
@@ -49,7 +50,7 @@
     def signalHandler(self, signum, frame):
         """Meta signal handler that dispatches to registered handlers."""
         signame = get_signal_name(signum)
-        zLOG.LOG('Z2', zLOG.INFO , "Caught signal %s" % signame)
+        LOG.info("Caught signal %s" % signame)
 
         for handler in self.registry.get(signum, []):
             # Never let a bad handler prevent the standard signal
@@ -59,9 +60,8 @@
                 # if we trap SystemExit, we can't restart
                 raise
             except:
-                zLOG.LOG('Z2', zLOG.WARNING,
-                         'A handler for %s failed!' % signame,
-                         error=sys.exc_info())
+                LOG.warn('A handler for %s failed!' % signame,
+                         exc_info=sys.exc_info())
 
 _signals = None
 

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to