[Zodb-checkins] CVS: Zope3/lib/python/ZODB - DB.py:1.60
Guido van Rossum
guido@python.org
Thu, 19 Dec 2002 17:20:58 -0500
Update of /cvs-repository/Zope3/lib/python/ZODB
In directory cvs.zope.org:/tmp/cvs-serv10101
Modified Files:
DB.py
Log Message:
Convert to logging module.
=== Zope3/lib/python/ZODB/DB.py 1.59 => 1.60 ===
--- Zope3/lib/python/ZODB/DB.py:1.59 Fri Dec 13 17:14:48 2002
+++ Zope3/lib/python/ZODB/DB.py Thu Dec 19 17:20:58 2002
@@ -22,13 +22,13 @@
from threading import Lock
from time import time, ctime
from types import StringType
+import logging
from ZODB import POSException
from ZODB.Connection import Connection
from ZODB.Serialize import getDBRoot
from ZODB.ZTransaction import Transaction
from ZODB.utils import z64
-from zLOG import LOG, ERROR, BLATHER
from Transaction import get_transaction
from Transaction.IDataManager import IDataManager
@@ -293,7 +293,7 @@
try:
self._storage.pack(t)
except:
- LOG("ZODB", ERROR, "packing", error=sys.exc_info())
+ logging.getLogger("ZODB").exception("packing")
raise
def setCacheSize(self, v):
@@ -322,7 +322,7 @@
self._prepare(txn)
self._storage.tpc_vote(txn)
except POSException.StorageError, err:
- LOG("DB", BLATHER, "Error during prepare: %s" % err)
+ logging.getLogger("DB").info("Error during prepare: %s", err)
return False
else:
return True