[Zope-Checkins]
SVN: Zope/trunk/lib/python/Shared/DC/ZRDB/Connection.py
zLOG -> logging
Andreas Jung
andreas at andreas-jung.com
Sun Jan 8 05:50:28 EST 2006
Log message for revision 41198:
zLOG -> logging
Changed:
U Zope/trunk/lib/python/Shared/DC/ZRDB/Connection.py
-=-
Modified: Zope/trunk/lib/python/Shared/DC/ZRDB/Connection.py
===================================================================
--- Zope/trunk/lib/python/Shared/DC/ZRDB/Connection.py 2006-01-08 10:47:25 UTC (rev 41197)
+++ Zope/trunk/lib/python/Shared/DC/ZRDB/Connection.py 2006-01-08 10:50:28 UTC (rev 41198)
@@ -15,6 +15,7 @@
$Id$'''
__version__='$Revision: 1.39 $'[11:-2]
+from logging import getLogger
import Globals, OFS.SimpleItem, AccessControl.Role, Acquisition, sys
from DateTime import DateTime
from App.Dialogs import MessageDialog
@@ -30,11 +31,14 @@
from cStringIO import StringIO
from Results import Results
from sys import exc_info
-from zLOG import LOG, ERROR
+
from cgi import escape
import DocumentTemplate, RDB
from zExceptions import BadRequest
+
+LOG = getLogger('ZRDB.Connection')
+
class Connection(
Globals.Persistent,
AccessControl.Role.RoleManager,
@@ -67,10 +71,8 @@
if self.connection_string:
try: self.connect(self.connection_string)
except:
- LOG('Shared.DC.ZRDB.Connection',
- ERROR,
- 'Error connecting to relational database.',
- error=exc_info())
+ LOG.error('Error connecting to relational database.',
+ exc_info=exc_info())
def title_and_id(self):
s=Connection.inheritedAttribute('title_and_id')(self)
@@ -157,10 +159,8 @@
if hasattr(self,'_v_database_connection'):
self._v_database_connection.close()
except:
- LOG('Shared.DC.ZRDB.Connection',
- ERROR,
- 'Error closing relational database connection.',
- error=exc_info())
+ LOG.error('Error closing relational database connection.',
+ exc_info=exc_info())
self._v_connected=''
if REQUEST is not None:
return self.manage_main(self, REQUEST)
More information about the Zope-Checkins
mailing list