Commit 6af55f43 authored by Andreas Jung's avatar Andreas Jung

death to zLOG

parent c5bea2cf
...@@ -17,7 +17,7 @@ import ExtensionClass ...@@ -17,7 +17,7 @@ import ExtensionClass
from MultiMapping import MultiMapping from MultiMapping import MultiMapping
import Record import Record
from Missing import MV from Missing import MV
from zLOG import LOG, ERROR import logging
from Lazy import LazyMap, LazyFilter, LazyCat, LazyValues from Lazy import LazyMap, LazyFilter, LazyCat, LazyValues
from CatalogBrains import AbstractCatalogBrain, NoBrainer from CatalogBrains import AbstractCatalogBrain, NoBrainer
...@@ -30,6 +30,8 @@ import time, sys, types ...@@ -30,6 +30,8 @@ import time, sys, types
from bisect import bisect from bisect import bisect
from random import randint from random import randint
LOG = logging.getLogger('ZCatalog')
try: try:
from DocumentTemplate.cDocumentTemplate import safe_callable from DocumentTemplate.cDocumentTemplate import safe_callable
except ImportError: except ImportError:
...@@ -231,8 +233,7 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -231,8 +233,7 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
_index = names.index(name) _index = names.index(name)
if not self.schema.has_key(name): if not self.schema.has_key(name):
LOG('Catalog', ERROR, ('delColumn attempted to delete ' LOG.error('delColumn attempted to delete nonexistent column %s.' % str(name))
'nonexistent column %s.' % str(name)))
return return
names.remove(name) names.remove(name)
...@@ -390,8 +391,7 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -390,8 +391,7 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
blah = x.index_object(index, object, threshold) blah = x.index_object(index, object, threshold)
total = total + blah total = total + blah
else: else:
LOG('Catalog', ERROR, ('catalogObject was passed ' LOG.error('catalogObject was passed bad index object %s.' % str(x))
'bad index object %s.' % str(x)))
return total return total
...@@ -424,9 +424,9 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -424,9 +424,9 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
try: self.__len__.change(-1) try: self.__len__.change(-1)
except AttributeError: pass # No managed length except AttributeError: pass # No managed length
else: else:
LOG('Catalog', ERROR, ('uncatalogObject unsuccessfully ' LOG.error('uncatalogObject unsuccessfully '
'attempted to uncatalog an object ' 'attempted to uncatalog an object '
'with a uid of %s. ' % str(uid))) 'with a uid of %s. ' % str(uid))
def uniqueValuesFor(self, name): def uniqueValuesFor(self, name):
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
__version__ = "$Revision$"[11:-2] __version__ = "$Revision$"[11:-2]
import Acquisition, Record import Acquisition, Record
import zLOG
import sys
class AbstractCatalogBrain(Record.Record, Acquisition.Implicit): class AbstractCatalogBrain(Record.Record, Acquisition.Implicit):
"""Abstract base brain that handles looking up attributes as """Abstract base brain that handles looking up attributes as
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
############################################################################## ##############################################################################
"""$Id: ZCatalogIndexes.py,v 1.8 2002/08/14 22:25:15 mj Exp $ """$Id: ZCatalogIndexes.py,v 1.9 2004/04/14 08:20:23 andreasjung Exp $
""" """
from Globals import DTMLFile, InitializeClass from Globals import DTMLFile, InitializeClass
...@@ -24,11 +24,11 @@ from OFS.History import Historical ...@@ -24,11 +24,11 @@ from OFS.History import Historical
from OFS.SimpleItem import SimpleItem from OFS.SimpleItem import SimpleItem
from OFS.ObjectManager import ObjectManager, IFAwareObjectManager from OFS.ObjectManager import ObjectManager, IFAwareObjectManager
import os, sys, time import os, sys, time
from Acquisition import Implicit from Acquisition import Implicit
from Persistence import Persistent from Persistence import Persistent
from zLOG import LOG, ERROR
from Products.PluginIndexes.common.PluggableIndex import PluggableIndexInterface from Products.PluginIndexes.common.PluggableIndex import PluggableIndexInterface
_marker = [] _marker = []
......
...@@ -24,7 +24,6 @@ import Persistence ...@@ -24,7 +24,6 @@ import Persistence
import ExtensionClass import ExtensionClass
from Testing import dispatcher from Testing import dispatcher
import keywords import keywords
from zLOG import LOG
import getopt,whrandom,time,string,mailbox,rfc822 import getopt,whrandom,time,string,mailbox,rfc822
......
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