[Zope-Checkins] SVN: Zope/trunk/lib/python/OFS/ zLOG -> logging

Andreas Jung andreas at andreas-jung.com
Sun Jan 8 05:52:37 EST 2006


Log message for revision 41199:
  zLOG -> logging

Changed:
  U   Zope/trunk/lib/python/OFS/ObjectManager.py
  U   Zope/trunk/lib/python/OFS/Uninstalled.py

-=-
Modified: Zope/trunk/lib/python/OFS/ObjectManager.py
===================================================================
--- Zope/trunk/lib/python/OFS/ObjectManager.py	2006-01-08 10:50:28 UTC (rev 41198)
+++ Zope/trunk/lib/python/OFS/ObjectManager.py	2006-01-08 10:52:36 UTC (rev 41199)
@@ -43,7 +43,7 @@
 from webdav.Lockable import ResourceLockedError
 from webdav.NullResource import NullResource
 from zExceptions import BadRequest
-from zLOG import LOG, ERROR
+
 from ZODB.POSException import ConflictError
 from zope.interface import implements
 
@@ -67,6 +67,7 @@
     }
 
 bad_id=re.compile(r'[^a-zA-Z0-9-_~,.$\(\)# @]').search
+LOG = getLogger('OFS.ObjectManager')
 
 def checkValidId(self, id, allow_dup=0):
     # If allow_dup is false, an error will be raised if an object

Modified: Zope/trunk/lib/python/OFS/Uninstalled.py
===================================================================
--- Zope/trunk/lib/python/OFS/Uninstalled.py	2006-01-08 10:50:28 UTC (rev 41198)
+++ Zope/trunk/lib/python/OFS/Uninstalled.py	2006-01-08 10:52:36 UTC (rev 41199)
@@ -17,11 +17,13 @@
 from Acquisition import Acquired
 import Persistence
 from thread import allocate_lock
-from zLOG import LOG, WARNING
+
 from cgi import escape
+from logging import getLogger
 
 broken_klasses={}
 broken_klasses_lock = allocate_lock()
+LOG = getLogger('OFS.Uninstalled')
 
 class BrokenClass(Acquisition.Explicit, SimpleItem.Item,
                   Persistence.Overridable):
@@ -71,8 +73,8 @@
             klass.info=(
                 'This object\'s class was %s in module %s.' %
                 (klass.__name__, klass.__module__))
-            LOG('ZODB', WARNING, 'Could not import class %s '
-                'from module %s' % (`klass.__name__`, `klass.__module__`))
+            LOG.warning('Could not import class %s '
+                    'from module %s' % (`klass.__name__`, `klass.__module__`))
     finally:
         broken_klasses_lock.release()
     if oid is None: return klass



More information about the Zope-Checkins mailing list