[Zodb-checkins] CVS: Zope3/lib/python/BDBStorage - BerkeleyBase.py:2.5

Guido van Rossum guido@python.org
Thu, 19 Dec 2002 17:20:29 -0500


Update of /cvs-repository/Zope3/lib/python/BDBStorage
In directory cvs.zope.org:/tmp/cvs-serv10039

Modified Files:
	BerkeleyBase.py 
Log Message:
Convert to logging module.


=== Zope3/lib/python/BDBStorage/BerkeleyBase.py 2.4 => 2.5 ===
--- Zope3/lib/python/BDBStorage/BerkeleyBase.py:2.4	Mon Dec 16 16:01:27 2002
+++ Zope3/lib/python/BDBStorage/BerkeleyBase.py	Thu Dec 19 17:20:28 2002
@@ -22,6 +22,7 @@
 import shutil
 import threading
 from types import StringType
+import logging
 
 # This uses the Dunn/Kuchling PyBSDDB v3 extension module available from
 # http://pybsddb.sourceforge.net
@@ -32,7 +33,6 @@
 from ZODB.lock_file import lock_file
 from ZODB.BaseStorage import BaseStorage
 from ZODB.Serialize import findrefs
-import zLOG
 
 GBYTES = 1024 * 1024 * 1000
 
@@ -188,6 +188,9 @@
         if env is None:
             env = name
 
+        logger = logging.getLogger(self.__class__.__name__)
+        self.log = logger.warn
+
         self.log('Creating Berkeley environment')
         if env == '':
             raise TypeError, 'environment name is empty'
@@ -340,9 +343,6 @@
         # BAW: no-op this since the right CommitLog file operations are
         # performed by the methods in the derived storage class.
         pass
-
-    def log(self, msg, *args):
-        zLOG.LOG(self.__class__.__name__, zLOG.INFO, msg % args)
 
     def close(self):
         """Close the storage.