Commit dbead218 authored by Nicolas Delaby's avatar Nicolas Delaby

Use Zope log levels.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34185 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 95dbae14
from logging import ERROR # -*- coding: utf-8 -*-
from zLOG import ERROR
from UserDict import UserDict from UserDict import UserDict
from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.PageTemplates.PageTemplateFile import PageTemplateFile
......
# -*- coding: utf-8 -*-
from AccessControl.Role import RoleManager from AccessControl.Role import RoleManager
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Acquisition import Implicit from Acquisition import Implicit
...@@ -39,7 +40,7 @@ from zope.interface import implements ...@@ -39,7 +40,7 @@ from zope.interface import implements
__revision__ = '$Id: TransformEngine.py 6255 2006-04-11 15:29:29Z hannosch $' __revision__ = '$Id: TransformEngine.py 6255 2006-04-11 15:29:29Z hannosch $'
from logging import DEBUG from zLOG import DEBUG
class TransformTool(UniqueObject, ActionProviderBase, Folder): class TransformTool(UniqueObject, ActionProviderBase, Folder):
......
# -*- coding: utf-8 -*-
### Register Transforms ### Register Transforms
### This is interesting because we don't expect all transforms to be ### This is interesting because we don't expect all transforms to be
### available on all platforms. To do this we allow things to fail at ### available on all platforms. To do this we allow things to fail at
...@@ -11,7 +12,7 @@ ...@@ -11,7 +12,7 @@
### implement the transform, if register needs to fail for now it ### implement the transform, if register needs to fail for now it
### should raise an ImportError as well (dumb, I know) ### should raise an ImportError as well (dumb, I know)
from logging import DEBUG, ERROR from zLOG import DEBUG, ERROR
from Products.PortalTransforms.utils import log from Products.PortalTransforms.utils import log
from Products.PortalTransforms.libtransforms.utils import MissingBinary from Products.PortalTransforms.libtransforms.utils import MissingBinary
modules = [ modules = [
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import logging from zLOG import ERROR
from HTMLParser import HTMLParser, HTMLParseError from HTMLParser import HTMLParser, HTMLParseError
import re import re
from cgi import escape from cgi import escape
...@@ -251,7 +251,7 @@ class SafeHTML: ...@@ -251,7 +251,7 @@ class SafeHTML:
def convert(self, orig, data, **kwargs): def convert(self, orig, data, **kwargs):
# note if we need an upgrade. # note if we need an upgrade.
if not self.config.has_key('disable_transform'): if not self.config.has_key('disable_transform'):
log(logging.ERROR, 'PortalTransforms safe_html transform needs to be ' log(ERROR, 'PortalTransforms safe_html transform needs to be '
'updated. Please re-install the PortalTransforms product to fix.') 'updated. Please re-install the PortalTransforms product to fix.')
# if we have a config that we don't want to delete # if we have a config that we don't want to delete
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""some common utilities """some common utilities
""" """
import logging
from time import time from time import time
from types import UnicodeType, StringType from types import UnicodeType, StringType
...@@ -13,10 +12,10 @@ class TransformException(Exception): ...@@ -13,10 +12,10 @@ class TransformException(Exception):
FB_REGISTRY = None FB_REGISTRY = None
# logging function # logging function
from zLOG import LOG from zLOG import LOG, INFO
#logger = logging.getLogger('PortalTransforms') #logger = logging.getLogger('PortalTransforms')
def log(message, severity=logging.INFO): def log(message, severity=INFO):
LOG('PortalTransforms', severity, message) LOG('PortalTransforms', severity, message)
#logger.log(severity, message) #logger.log(severity, message)
......
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