At 05:15 PM 1/14/2008 +0000, Chris Withers wrote: >Phillip J. Eby wrote: >>At 02:03 PM 12/21/2007 +0000, Chris Withers wrote: >>>I think I'm missing something: what in the logging package makes >>>you log by which module issued the message? >>That's the conventional usage: modules that use logging usually use >>a static logger based on module name. Take a look at the >>distutils, for example. > >Yeah, but I don't see anything in the logging package that enforces >this convention... > >>It's not common for modules that do logging, to take logger objects >>as part of their API, and if they did, it would almost certainly suck. > >Why would they need to? The logging module has its own registry of loggers. > >getLogger('x.y.z') only creates a logger if it doesn't already exist...
You're only shifting the issue from taking loggers as arguments, to logger *names* as arguments. This doesn't change the problem in the least -- it just adds the overhead of doing a lookup. _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com