[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup - __init__.py:1.2.2.9

Fred L. Drake, Jr. fred@zope.com
Mon, 24 Feb 2003 17:20:26 -0500


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

Modified Files:
      Tag: new-install-branch
	__init__.py 
Log Message:
- simplify some logging initialization
- remove trailing blank lines


=== Zope/lib/python/Zope/Startup/__init__.py 1.2.2.8 => 1.2.2.9 ===
--- Zope/lib/python/Zope/Startup/__init__.py:1.2.2.8	Mon Feb 24 15:15:41 2003
+++ Zope/lib/python/Zope/Startup/__init__.py	Mon Feb 24 17:20:25 2003
@@ -117,13 +117,12 @@
         except IOError:
             pass
 
-        # now that we've successfully setuid'd, we can log to
-        # somewhere other than stderr.  We rely on config
-        # to set up our logging properly.
-        for logger_name in ('access', 'trace'):
-            factory = getattr(cfg, logger_name)
-            if factory:
-                logger = factory() # activate the logger
+        # Now that we've successfully setuid'd, we can log to
+        # somewhere other than stderr.  Activate the configured logs:
+        if cfg.access is not None:
+            cfg.access()
+        if cfg.trace is not None:
+            cfg.trace()
 
         # flush buffered startup messages to event logger
         event_logger.removeHandler(startup_handler)
@@ -260,5 +259,3 @@
                 'See your operating system documentation for more\n'
                 'information on locale support.' % locale_id
                 )
-
-