Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'live?': 0.07; 'python': 0.08; 'from:addr:simplistix.co.uk': 0.09; 'from:name:chris withers': 0.09; 'handlers': 0.09; 'message-id:@simplistix.co.uk': 0.09; 'received:89.151': 0.09; 'received:89.151.125': 0.09; 'received:89.151.125.140': 0.09; 'received:server1.simplistix.co.uk': 0.09; 'received:simplistix.co.uk': 0.09; 'subject:python': 0.10; 'cc:addr:python-list': 0.15; 'cc:name:python list': 0.16; 'received:buzzkill.local': 0.16; 'simplistix': 0.16; 'subject:limitation': 0.16; 'url:simplistix': 0.16; 'that?': 0.18; 'cheers,': 0.20; 'from:addr:chris': 0.23; 'libraries': 0.24; 'cc:2**0': 0.25; 'looks': 0.27; 'filter': 0.28; "skip:' 10": 0.29; 'cc:addr:python.org': 0.29; 'down,': 0.30; 'chris': 0.30; 'subject:?': 0.30; 'app': 0.31; 'dependent': 0.32; 'it.': 0.33; 'header:User-Agent:1': 0.33; 'message.': 0.33; 'match': 0.33; 'rather': 0.34; 'certain': 0.34; 'root': 0.34; 'uses': 0.36; 'example,': 0.36; 'passed': 0.37; 'getting': 0.37; 'processing': 0.39; 'why': 0.39; 'or,': 0.39; 'url:uk': 0.40; 'more': 0.61; 'url:co': 0.63; 'making': 0.65; 'received:89': 0.65; 'to:addr:yahoo.co.uk': 0.91 Date: Mon, 16 Jan 2012 13:10:27 +0000 From: Chris Withers User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Vinay Sajip Subject: python loggingL filter limitation, looks intentional? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Python List X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326719422 news.xs4all.nl 6851 [2001:888:2000:d::a6]:56339 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:19039 Hi Vinay, It looks like this was intentional, so why was it decided that filters would only be passed messages logged to the logger they're attached to rather than the all messages that end up getting passed to logger? For example, an app and the libraries it uses log to 'some.db.driver', 'some.lib' and 'myapp'. The root logger has a number of handlers attached to it. I want to write a filter that adjusts, up or down, the level of certain messages logged based on a regex match of their message. If I understand correctly, I have to add my filter to all of the loggers above, rather than just the root logger where my handlers live? Or, alternatively, add the filter to all of the root handlers, thereby making the configuration of those handlers and/or more dependent on each other. Why is that? cheers, Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk