[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#623857: ITP: python-tracing -- Python debug tracing helper



On ma, 2011-04-25 at 19:48 +1200, Robert Collins wrote:
> On Sun, Apr 24, 2011 at 7:14 AM, Lars Wirzenius <liw@liw.fi> wrote:
> >  Provides the Python library 'tracing' to help with logging debug messages.
> >  This module provides a couple of functions for logging debug messages.
> >  It is sometimes practical to add a lot of debugging log messages to a
> >  program, but having them enabled all the time results in very large
> >  log files. Also, logging that much takes quite a bit of time.
> >  .
> >  This module provides a way to turn such debugging or tracing messages
> >  on and off, based on the filename they occur in.
> 
> This probably wants to explain whats different or interesting vs the
> stdlib logging module, which has that sort of functionality too.

Thanks, you're right, I should explain more. 

tracing.trace a wrapper around logging.debug, implemented in a way that
makes it very cheap to have many no-op calls. This allows the calls to
be sprinkled in places where they would otherwise not be OK, due to the
overhead of logging. tracing.trace does not require any ifs at the place
of the call.

I'll work that into the long description in some way before the upload.

(But I'd be happy to know of a way to achieve the same thing, with just
logging. The fewer packages I have, the better.)

-- 
Blog/wiki/website hosting with ikiwiki (free for free software):
http://www.branchable.com/




Reply to: