[Zope3-checkins] CVS: Zope3/src/zope/app/process - datatypes.py:1.1.2.2
Fred L. Drake, Jr.
fred@zope.com
Tue, 24 Jun 2003 16:26:57 -0400
Update of /cvs-repository/Zope3/src/zope/app/process
In directory cvs.zope.org:/tmp/cvs-serv5843
Modified Files:
Tag: fdrake-zconfig-in-zope-3-branch
datatypes.py
Log Message:
update the event-logger configurator to support direct use of the
logging package
=== Zope3/src/zope/app/process/datatypes.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/process/datatypes.py:1.1.2.1 Mon Jun 23 18:07:58 2003
+++ Zope3/src/zope/app/process/datatypes.py Tue Jun 24 16:26:57 2003
@@ -235,14 +235,14 @@
def create(self):
# set the logger up
import logging
- logger = logging.getLogger("event")
+ logger = logging.getLogger()
logger.handlers = []
- logger.propagate = 0
+ if self.level == logging.NOTSET:
+ self.level = logging_level("all")
logger.setLevel(self.level)
if self.handler_factories:
- for handler_factory in self.handler_factories:
- handler = handler_factory()
- logger.addHandler(handler)
+ for factory in self.handler_factories:
+ logger.addHandler(factory())
else:
from zope.app.process.loghandlers import NullHandler
logger.addHandler(NullHandler())