On Mon, Mar 15, 2010 at 1:26 PM, Brian Jones <[email protected]> wrote:

> Hi all,
>
> I have some code that is a plugin for a larger app, and I'd like to be able
> to properly log issues that arise in the plugin code. I may not be
> maintaining this code forever, and I'd like the logging to work even if it's
> refactored later and code moved around, method names change, etc. So I'd
> like my logging to include a string identifying (programatically) the
> "module.class.method" where things went afoul.
>

Well, after some more reading, I found that I can get the module *and* the
method name if I add %(module)s and %(funcName) to my logging formatter. No
class though, and it's all or nothing: I really only want that behavior for
debug messages, not err/crit messages.

Any other thoughts?


-- 
Brian K. Jones
Python Magazine  http://www.pythonmagazine.com
My Blog          http://www.protocolostomy.com
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to