Vinay Sajip added the comment: Antoine, I take your point, but there are a number of ways of doing what you want, apart from the "extra" context argument:
1. Use your own logger classes which do what you want. It's probably best to make this a wrapper class so you can define different ones for different needs. 2. Use a non-string as your message. The "message" object passed to logging can be any object - str() is called on this to get the actual message. 3. You can use custom Formatter and/or Filter objects to manipulate the logged message and/or LogRecord instances. You could pass context information in a number of different ways, but using a threadlocal might be convenient where the platform supports it. Any of these approaches should work, and there should be no need to have a pattern where lots of logging.Logger instances need to be created just to output context information. ____________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue932563> ____________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com