On Wednesday 14 April 2004 01:49 am, Andreas Jung wrote: > What is the recommend way to migrate existing code? > > I assume using: > > import logging > logger = logging.getLogger(loggername).
That works, and certainly matches what I've been doing, and what we see in the Zope 3 codebase as well. > When I look through the Zope HEAD code then you are using e.g. > 'zodb.conn' or 'zodb.storage' but also 'Zope' as loggername. Do we > have to agree on some common usage of the logger names? > E.g. for logging calls in the reST package....better using 'Zope' or > 'reST'? I don't think there is a general convention at this time; where I've switched things over (only a few places), I've used what was being passed to zLOG.LOG as the subsystem parameter. Where there's no precedent... I don't know. A guiding convention would be nice; I could see using the package name if there's nothing else that sticks out as obvious. That doesn't match a lot of the existing usage, though. -Fred -- Fred L. Drake, Jr. <fred at zope.com> PythonLabs at Zope Corporation _______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )