Gary Jefferson wrote: > Vinay Sajip wrote: > > > > BTW I would also advise reading PEP-282 to understand more about the > > logging approach. > > > You've been most helpful, Vinay. The PEP section on Filters states > that I can do what I've been trying to do with filters, but doesn't > provide enough information to do it (or, at least, I'm too thick to > guess at how it would work by looking at the API and PEP and trying a > dozen different ways). Luckily, the examples you point to from your > original package do provide enough info; log_test15.py held the key. > > I still feel like it would be more intuitive if filters were inherited > down the hierarchy instead of having to go through the extra steps of > getting at the root handler first, but I'm sure there are good reasons > for not doing this. > > One more question, is there any way to get the list of all named > loggers (from the Manager, perhaps)? Or... maybe I don't need this, > either, as MatchFilter (log_test18.py) seems to do what I was thinking > I need the list of logger names for... most excellent. > > Thanks, > Gary > > BTW, the python logging module is one of the best readily available > loggers I've come across in any language.
Thanks. Glad the tests/examples (log_testxx.py) helped. When I get a chance, I will try to work some of them into the docs... Best regards, Vinay Sajip -- http://mail.python.org/mailman/listinfo/python-list