Message178145
| 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: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 |
|