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... cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk _______________________________________________ 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