Message178145
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. |
|
Date |
User |
Action |
Args |
2012-12-25 16:20:28 | glynnc | set | recipients:
+ glynnc |
2012-12-25 16:20:28 | glynnc | set | messageid: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za> |
2012-12-25 16:20:27 | glynnc | link | issue16778 messages |
2012-12-25 16:20:27 | glynnc | create | |
|