[Zope-dev] Re: zLOG deprecation?

Philipp von Weitershausen philipp at weitershausen.de
Mon Dec 5 10:10:06 EST 2005


Chris Withers wrote:
> Is zLOG deprecated?
> 
> If not, it should be...

+10

zLOG/__init__.py says:

  Note:
    This module exists only for backward compatibility.  Any new code
    for Zope 2.8 and newer should use the logging module from Python's
    standard library directly.  zLOG is only an API shim to map existing
    use of zLOG onto the standard logging API.

That means we could deprecate it even in Zope 2.9, using zLOG has
already been discouraged in Zope 2.8. I'm not sure if the differences in
logging levels will be important to backward compatability.
ZODB/loglevels.py explains the differences::

  # In the days of zLOG, there were 7 standard log levels, and ZODB/ZEO used
  # all of them.  Here's how they map to the logging package's 5
 standard
  # levels:
  #
  #    zLOG                         logging
  #    -------------                ---------------
  #    PANIC (300)                  FATAL, CRITICAL (50)
  #    ERROR (200)                  ERROR (40)
  #    WARNING, PROBLEM (100)       WARN (30)
  #    INFO (0)                     INFO (20)
  #    BLATHER (-100)               none -- defined here as BLATHER (15)
  #    DEBUG (-200)                 DEBUG (10)
  #    TRACE (-300)                 none -- defined here as TRACE (5)
  #
  # TRACE is used by ZEO for extremely verbose trace output, enabled only
  # when chasing bottom-level communications bugs.  It really should be at
  # a lower level than DEBUG.
  #
  # BLATHER is a harder call, and various instances could probably be folded
  # into INFO or DEBUG without real harm.

Philipp


More information about the Zope-Dev mailing list