Commit 2c1f04ca authored by Andreas Jung's avatar Andreas Jung

zLOG -> logging

parent 8a854815
...@@ -13,9 +13,11 @@ ...@@ -13,9 +13,11 @@
############################################################################## ##############################################################################
"""ZODB Mounted database support, simplified for DBTab. """ZODB Mounted database support, simplified for DBTab.
$Id: Mount.py,v 1.4 2004/04/15 16:41:05 jeremy Exp $""" $Id: Mount.py,v 1.5 2004/04/20 14:38:52 andreasjung Exp $"""
import sys import sys
from logging import getLogger
try: try:
from cStringIO import StringIO from cStringIO import StringIO
except: except:
...@@ -25,11 +27,11 @@ import traceback ...@@ -25,11 +27,11 @@ import traceback
import Persistence, Acquisition import Persistence, Acquisition
from Acquisition import aq_base from Acquisition import aq_base
from ZODB.POSException import MountedStorageError from ZODB.POSException import MountedStorageError
from zLOG import LOG, ERROR, INFO, WARNING
from ZODB.DB import DB from ZODB.DB import DB
from ZODB.Connection import Connection from ZODB.Connection import Connection
LOG = getLogger('Zope.ZODBMountPoint')
class MountPoint(Persistence.Persistent, Acquisition.Implicit): class MountPoint(Persistence.Persistent, Acquisition.Implicit):
"""An object that accesses a different database when traversed. """An object that accesses a different database when traversed.
...@@ -128,8 +130,7 @@ class MountPoint(Persistence.Persistent, Acquisition.Implicit): ...@@ -128,8 +130,7 @@ class MountPoint(Persistence.Persistent, Acquisition.Implicit):
def _logConnectException(self): def _logConnectException(self):
"""Records info about the exception that just occurred.""" """Records info about the exception that just occurred."""
exc = sys.exc_info() exc = sys.exc_info()
LOG('ZODB', ERROR, 'Failed to mount database. %s (%s)' % exc[:2], LOG.error('Failed to mount database. %s (%s)' % exc[:2], exc_info=exc)
error=exc)
f=StringIO() f=StringIO()
traceback.print_tb(exc[2], 100, f) traceback.print_tb(exc[2], 100, f)
self._v_connect_error = (exc[0], exc[1], f.getvalue()) self._v_connect_error = (exc[0], exc[1], f.getvalue())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment