Commit 801ff59a authored by Andreas Jung's avatar Andreas Jung

zLOG -> logging

parent 1185d4ee
...@@ -43,7 +43,7 @@ from webdav.Collection import Collection ...@@ -43,7 +43,7 @@ from webdav.Collection import Collection
from webdav.Lockable import ResourceLockedError from webdav.Lockable import ResourceLockedError
from webdav.NullResource import NullResource from webdav.NullResource import NullResource
from zExceptions import BadRequest from zExceptions import BadRequest
from zLOG import LOG, ERROR
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
from zope.interface import implements from zope.interface import implements
...@@ -67,6 +67,7 @@ customImporters={ ...@@ -67,6 +67,7 @@ customImporters={
} }
bad_id=re.compile(r'[^a-zA-Z0-9-_~,.$\(\)# @]').search bad_id=re.compile(r'[^a-zA-Z0-9-_~,.$\(\)# @]').search
LOG = getLogger('OFS.ObjectManager')
def checkValidId(self, id, allow_dup=0): def checkValidId(self, id, allow_dup=0):
# If allow_dup is false, an error will be raised if an object # If allow_dup is false, an error will be raised if an object
......
...@@ -17,11 +17,13 @@ import SimpleItem, Globals, Acquisition ...@@ -17,11 +17,13 @@ import SimpleItem, Globals, Acquisition
from Acquisition import Acquired from Acquisition import Acquired
import Persistence import Persistence
from thread import allocate_lock from thread import allocate_lock
from zLOG import LOG, WARNING
from cgi import escape from cgi import escape
from logging import getLogger
broken_klasses={} broken_klasses={}
broken_klasses_lock = allocate_lock() broken_klasses_lock = allocate_lock()
LOG = getLogger('OFS.Uninstalled')
class BrokenClass(Acquisition.Explicit, SimpleItem.Item, class BrokenClass(Acquisition.Explicit, SimpleItem.Item,
Persistence.Overridable): Persistence.Overridable):
...@@ -71,8 +73,8 @@ def Broken(self, oid, pair): ...@@ -71,8 +73,8 @@ def Broken(self, oid, pair):
klass.info=( klass.info=(
'This object\'s class was %s in module %s.' % 'This object\'s class was %s in module %s.' %
(klass.__name__, klass.__module__)) (klass.__name__, klass.__module__))
LOG('ZODB', WARNING, 'Could not import class %s ' LOG.warning('Could not import class %s '
'from module %s' % (`klass.__name__`, `klass.__module__`)) 'from module %s' % (`klass.__name__`, `klass.__module__`))
finally: finally:
broken_klasses_lock.release() broken_klasses_lock.release()
if oid is None: return klass if oid is None: return klass
......
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