Author glynnc
Recipients glynnc
Date 2012-12-25.16:20:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za>
In-reply-to
Content
The current behaviour of logging.Logger.findCaller() makes it awkward to add custom logging interfaces.

E.g. suppose that you define a custom logging level (NOTICE) then add a notice() function (analogous to logging.info() etc), the resulting LogRecord structure will have pathname, filename, module, funcName and lineno members which refer to the notice() function itself, rather than to its caller.

This can be hacked around e.g. by using code.compile_command to lie about the source filename, but that's ugly and highly unintuitive.
History
Date User Action Args
2012-12-25 16:20:28glynncsetrecipients: + glynnc
2012-12-25 16:20:28glynncsetmessageid: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za>
2012-12-25 16:20:27glynnclinkissue16778 messages
2012-12-25 16:20:27glynnccreate