Commit ec16af67 authored by Jérome Perrin's avatar Jérome Perrin

ComponentTool: replace zLOG by logging

parent c65b1dcc
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
# #
############################################################################## ##############################################################################
import logging
from six import string_types as basestring from six import string_types as basestring
from types import ModuleType from types import ModuleType
...@@ -40,8 +41,6 @@ from AccessControl.Permission import Permission ...@@ -40,8 +41,6 @@ from AccessControl.Permission import Permission
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type.dynamic import aq_method_lock from Products.ERP5Type.dynamic import aq_method_lock
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from zLOG import LOG, INFO, WARNING
import six import six
global_stream = None global_stream = None
...@@ -50,6 +49,8 @@ from DateTime import DateTime ...@@ -50,6 +49,8 @@ from DateTime import DateTime
DEFAULT_TEST_TEMPLATE_COPYRIGHT = "Copyright (c) 2002-%s Nexedi SA and " \ DEFAULT_TEST_TEMPLATE_COPYRIGHT = "Copyright (c) 2002-%s Nexedi SA and " \
"Contributors. All Rights Reserved." % DateTime().year() "Contributors. All Rights Reserved." % DateTime().year()
logger = logging.getLogger(__name__)
live_test_running = False live_test_running = False
last_sync = -1 last_sync = -1
class ComponentTool(BaseTool): class ComponentTool(BaseTool):
...@@ -143,7 +144,7 @@ class ComponentTool(BaseTool): ...@@ -143,7 +144,7 @@ class ComponentTool(BaseTool):
last_sync = cookie last_sync = cookie
LOG("ERP5Type.Tool.ComponentTool", INFO, "Resetting Components") logger.info("Resetting Components")
# Make sure that it is not possible to load Components or load Portal Type # Make sure that it is not possible to load Components or load Portal Type
# class when Components are reset through aq_method_lock # class when Components are reset through aq_method_lock
...@@ -285,7 +286,7 @@ class Test(ERP5TypeTestCase): ...@@ -285,7 +286,7 @@ class Test(ERP5TypeTestCase):
global live_test_running global live_test_running
self.serialize() self.serialize()
if live_test_running: if live_test_running:
LOG('ComponentTool', INFO, 'Live test already running') logger.info('Live test already running')
return '' return ''
global_stream = StringIO() global_stream = StringIO()
......
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