Florent Guillaume wrote:
For instance the transaction code logs at DEBUG level every transaction start and end (self.log.debug(...)). This makes the logs very verbose, and any other code I write that logs at DEBUG level gets drowned in it. Previously transaction logs were at TRACE level but this doesn't exist anymore, and the python logging framework doesn't have anything between INFO and DEBUG or below DEBUG.

Well, it supports numeric log levels, and you can define your own log levels too.

I'd suggest the transaction code either logs at a numeric level:

logger.log(-100,...)

or we define another logging level for TRACE:

import logging
logging.TRACE = logging.DEBUG - 10
logging.addLevelName(logging.TRACE,'TRACE')

...which can then be used in the transaction code as follows:

logger.log(logging.TRACE,...)

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
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 )

Reply via email to