[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup - __init__.py:1.16 warnfilter.py:1.2 zopeschema.xml:1.26

Fred L. Drake, Jr. fred at zope.com
Tue Apr 13 10:25:22 EDT 2004


Update of /cvs-repository/Zope/lib/python/Zope/Startup
In directory cvs.zope.org:/tmp/cvs-serv11892/Zope/Startup

Modified Files:
	__init__.py warnfilter.py zopeschema.xml 
Log Message:
Use the logging configuration component from ZConfig instead of the zLOG
implementation.  The configuration aspects of zLOG are about to disappear.


=== Zope/lib/python/Zope/Startup/__init__.py 1.15 => 1.16 ===
--- Zope/lib/python/Zope/Startup/__init__.py:1.15	Fri Apr  9 17:21:56 2004
+++ Zope/lib/python/Zope/Startup/__init__.py	Tue Apr 13 10:24:51 2004
@@ -110,9 +110,6 @@
     def setupStartupHandler(self):
         # set up our initial logging environment (log everything to stderr
         # if we're not in debug mode).
-        import zLOG
-        import zLOG.EventLogger
-
         from ZConfig.components.logger.loghandler import StartupHandler
 
         if self.cfg.eventlog is not None:
@@ -125,7 +122,9 @@
 
         self.startup_handler = StartupHandler(sys.stderr)
         self.startup_handler.setLevel(level)
-        formatter = zLOG.EventLogger.formatters['file']
+        formatter = logging.Formatter(
+            fmt='------\n%(asctime)s %(levelname)s %(name)s %(message)s',
+            datefmt='%Y-%m-%dT%H:%M:%S')
         self.startup_handler.setFormatter(formatter)
         if not self.cfg.debug_mode:
             # prevent startup messages from going to stderr if we're not


=== Zope/lib/python/Zope/Startup/warnfilter.py 1.1 => 1.2 ===
--- Zope/lib/python/Zope/Startup/warnfilter.py:1.1	Thu Nov  6 03:01:45 2003
+++ Zope/lib/python/Zope/Startup/warnfilter.py	Tue Apr 13 10:24:51 2004
@@ -53,5 +53,3 @@
     warnings.filterwarnings(section.action, section.message, section.category,
                             section.module, section.lineno, 1)
     return section
-
-


=== Zope/lib/python/Zope/Startup/zopeschema.xml 1.25 => 1.26 ===
--- Zope/lib/python/Zope/Startup/zopeschema.xml:1.25	Thu Jan 15 18:05:08 2004
+++ Zope/lib/python/Zope/Startup/zopeschema.xml	Tue Apr 13 10:24:51 2004
@@ -4,7 +4,8 @@
 
   <!-- type definitions -->
 
-  <import package="zLOG"/>
+  <import package="ZConfig.components.logger" file="handlers.xml"/>
+  <import package="ZConfig.components.logger" file="eventlog.xml"/>
   <import package="ZODB"/>
   <import package="ZServer"/>
   <import package="tempstorage"/>
@@ -13,8 +14,9 @@
   <sectiontype name="logger" datatype=".LoggerFactory">
     <description>
       This "logger" type only applies to access and request ("trace")
-      logging; event logging is handled by the zLOG package, which
-      provides the loghandler type used here.
+      logging; event logging is handled by the "logging" package in
+      the Python standard library.  The loghandler type used here is
+      provided by the "ZConfig.components.logger" package.
     </description>
     <key name="level"
          datatype="ZConfig.components.logger.datatypes.logging_level"




More information about the Zope-Checkins mailing list