[Zope-Checkins] SVN: Zope/trunk/lib/python/Products/Transience/TransientObject.py Merge from 2.7 branch:

Fred Drake fred at zope.com
Thu May 20 17:08:23 EDT 2004


On Thursday 20 May 2004 04:56 pm, Chris McDonough wrote:
 > - The 2.7 branch still uses zLOG and having two separate
 >   implementations of the module (one which uses the logging module,

But 2.7.x is using the logging module as a backend for zLOG, so it's not out 
of the question to use logging directly.  A little tedious given that the 
2.7.x zLOG always writes events to the "event" log, while the 2.8+ zLOG does 
a nicer (IMO) job of mapping zLOG "facilities" to logging-module loggers.

 > - Currently it's not possible to filter by subsystem when writing
 >   out a log, so I'd need to use grep or something to filter just
 >   the TOC debug output.  I don't much want to bother. This
 >   should probably be fixed.

That's really a matter of configuration for 2.8+; I think it'll be fairly easy 
to deal with.  The <eventlog> section of the configuration file describes 
handling for the root logger; child loggers inherit that behavior.  If the 
<evenlog> section allows additional logger-specific sections, output for 
specific subsystems can be handled specially.  I've been thinking of 
something like:

  <eventlog>
    level info

    <log>
      name mysubsystem
      level debug
      # maybe even have some logger-specific handlers as well
    </log>

    # global handlers go here
  </eventlog>

This would be fairly easy to make part of the common logging package 
configuration supplied by ZConfig; any schema that uses that would be able to 
use this without changes to the schema.  Existing configuration files would 
not be affected as well.


  -Fred

-- 
Fred L. Drake, Jr.  <fred at zope.com>
PythonLabs at Zope Corporation




More information about the Zope-Checkins mailing list