Log message for revision 41205:
  zLOG -> logging
  

Changed:
  U   Zope/trunk/lib/python/ZServer/medusa/ftp_server.py
  U   Zope/trunk/lib/python/ZServer/utils.py

-=-
Modified: Zope/trunk/lib/python/ZServer/medusa/ftp_server.py
===================================================================
--- Zope/trunk/lib/python/ZServer/medusa/ftp_server.py  2006-01-08 11:21:06 UTC 
(rev 41204)
+++ Zope/trunk/lib/python/ZServer/medusa/ftp_server.py  2006-01-08 11:25:58 UTC 
(rev 41205)
@@ -705,7 +705,7 @@
         self.ip = ip
         self.port = port
         self.authorizer = authorizer
-        
+
         if hostname is None:
             self.hostname = socket.gethostname()
         else:

Modified: Zope/trunk/lib/python/ZServer/utils.py
===================================================================
--- Zope/trunk/lib/python/ZServer/utils.py      2006-01-08 11:21:06 UTC (rev 
41204)
+++ Zope/trunk/lib/python/ZServer/utils.py      2006-01-08 11:25:58 UTC (rev 
41205)
@@ -13,24 +13,26 @@
 
 """ A set of utility routines used by asyncore initialization """
 
+
 def getZopeVersion():
     import App.version_txt
     return App.version_txt.version_txt()
 
 def patchAsyncoreLogger():
-    # Poke zLOG default logging into asyncore to send
-    # messages to zLOG instead of medusa logger
-    from zLOG import LOG, register_subsystem, BLATHER, INFO, WARNING, ERROR
+    # Poke the Python logging module into asyncore to send messages to logging
+    # instead of medusa logger
+
+    from logging import getLogger
+    LOG = getLogger('ZServer')
     register_subsystem('ZServer')
-    severity={'info':INFO, 'warning':WARNING, 'error': ERROR}
 
     def log_info(self, message, type='info'):
         if message[:14]=='adding channel' or \
            message[:15]=='closing channel' or \
            message == 'Computing default hostname':
-            LOG('ZServer', BLATHER, message)
+            LOG.debug(message)
         else:
-            LOG('ZServer', severity[type], message)
+            getattr(LOG, severity)(message)
 
     import asyncore
     asyncore.dispatcher.log_info=log_info

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

Reply via email to