Commit 17556ac1 authored by Andreas Jung's avatar Andreas Jung

zLOG -> logging

parent 09c84005
...@@ -21,10 +21,10 @@ import os ...@@ -21,10 +21,10 @@ import os
import sys import sys
import glob import glob
import warnings import warnings
from logging import getLogger
import App.config import App.config
import Products import Products
from zLOG import LOG, ERROR
from zope.interface import classImplements, classImplementsOnly, implementedBy from zope.interface import classImplements, classImplementsOnly, implementedBy
from zope.interface.interface import InterfaceClass from zope.interface.interface import InterfaceClass
...@@ -43,6 +43,7 @@ from bridge import fromZ2Interface ...@@ -43,6 +43,7 @@ from bridge import fromZ2Interface
from browser.metaconfigure import page from browser.metaconfigure import page
debug_mode = App.config.getConfiguration().debug_mode debug_mode = App.config.getConfiguration().debug_mode
LOG = getLogger('Five')
def findProducts(): def findProducts():
import Products import Products
...@@ -63,7 +64,7 @@ def handleBrokenProduct(product): ...@@ -63,7 +64,7 @@ def handleBrokenProduct(product):
# in the control panel. However, all attempts to do so has failed from my # in the control panel. However, all attempts to do so has failed from my
# side. //regebro # side. //regebro
exc = sys.exc_info() exc = sys.exc_info()
LOG('Five', ERROR, 'Could not import Product %s' % product.__name__, error=exc) LOG.error('Could not import Product %s' % product.__name__, exc_info=exc)
def loadProducts(_context): def loadProducts(_context):
products = findProducts() products = findProducts()
......
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