[Zodb-checkins] CVS: Zope3/src/ZODB - ConflictResolution.py:1.23

Gintautas Miliauskas gintas at pov.lt
Sat Apr 17 18:45:32 EDT 2004


Update of /cvs-repository/Zope3/src/ZODB
In directory cvs.zope.org:/tmp/cvs-serv19036/src/ZODB

Modified Files:
	ConflictResolution.py 
Log Message:
Updated ConflictResolution to use logging instead of zLOG.


=== Zope3/src/ZODB/ConflictResolution.py 1.22 => 1.23 ===
--- Zope3/src/ZODB/ConflictResolution.py:1.22	Wed Feb 18 21:59:06 2004
+++ Zope3/src/ZODB/ConflictResolution.py	Sat Apr 17 18:45:28 2004
@@ -12,12 +12,16 @@
 #
 ##############################################################################
 import sys
+import logging
 from cStringIO import StringIO
 from cPickle import Unpickler, Pickler
 from pickle import PicklingError
 
 from ZODB.POSException import ConflictError
-import zLOG
+
+BLATHER = 15
+logging.addLevelName("BLATHER", BLATHER)
+logger = logging.getLogger('zodb.ConflictResolution')
 
 ResolvedSerial = 'rs'
 
@@ -39,8 +43,7 @@
         _class_cache[args] = cls
 
         if cls == 1:
-            zLOG.LOG("Conflict Resolution", zLOG.BLATHER,
-                     "Unable to load class", error=sys.exc_info())
+            logger.log(BLATHER, "Unable to load class", exc_info=True)
 
     if cls == 1:
         # Not importable
@@ -136,8 +139,7 @@
         # the original ConflictError.  A client can recover from a
         # ConflictError, but not necessarily from other errors.  But log
         # the error so that any problems can be fixed.
-        zLOG.LOG("Conflict Resolution", zLOG.ERROR,
-                 "Unexpected error", error=sys.exc_info())
+        logger.error("Unexpected error", exc_info=True)
         return None
 
 class ConflictResolvingStorage:




More information about the Zodb-checkins mailing list