New submission from Glynn Clements: 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. ---------- components: Library (Lib) messages: 178145 nosy: glynnc priority: normal severity: normal status: open title: Logger.findCaller needs to be smarter type: enhancement versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16778> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com