[Zope-dev] Re: zLOG deprecation?

Philipp von Weitershausen philipp at weitershausen.de
Mon Dec 5 22:51:33 EST 2005


Chris Withers wrote:
> Philipp von Weitershausen wrote:
> >>If not, it should be...
> >
> > +10
>
> Yeah, me too! Hence why I was asking ;-)
>
> > That means we could deprecate it even in Zope 2.9, using zLOG has
> > already been discouraged in Zope 2.8.
>
> Cool, Andreas, can you make it start emitting deprecation warnings?
> (if you do, lemme know and I'll go grep the Zope 2 source and try and
> eradicate any remaining zLOG)

This would probably best be handled by one person, so if you are willing to do all the
grepping and updating, making zLOG deprecated would just be a minor operation :). In
zLOG.LOG one would call warnings.warn() and the custom zLOG logging level constants could
be wrapped in a deprecation warnings (zope.deprecation.deprecate) telling people where to
import the level from now (either logging or ZODB.loglevels).

> > I'm not sure if the differences in
> > logging levels will be important to backward compatability.
>
> I _know_ they won't ;-)

If you say so :)

> > 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)
>
> imnsho, blather and debug are the wrong way round. blather should go
> away completely, it's a stupid name anyway :-(

Well, stupid or not, the order in which BLATHER and DEBUG are should be preserved, even if
it might not make sense. Question is if we actually need BLATHER in the future. For all I
care we could rip it out.

Philipp


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


More information about the Zope-Dev mailing list