Vinay Sajip <vinay_sa...@yahoo.co.uk> added the comment:

> Leonardo Rochael Almeida  added the comment:

> 
> At the very least this is a documentation bug. By reading the std docs
> on the logging module [1] one gets the impression that if a log record
> gets to a certain logger, even if percolated from more specific loggers,
> then the filters to that logger should be involved and even get the
> chance to change the log record.
> 
> [1] http://docs.python.org/library/logging.html
> 
> This is reinforced by the documentation and the implementation of the
> logging.Filter class, which is supposed to filter-out messages of more
> specific loggers, but which would never actually filter out anything if
> applied to a Logger of the same "name" (as opposed to a Handler, since
> filter handlers do get called for log records of more specific loggers).
> 

Can you say more specifically which part of this document you think is 
misleading? For example, the Filter documentation says "Filters can be used by 
Handlers and Loggers for
more sophisticated filtering than is provided by levels." Now this 
documentation does also mention how the default Filter implementation works, 
which does refer to loggers and their children - but that's just a specific 
implementation of a Filter which allows through some part of the logger 
namespace hierarchy. (It just looks at the logger name to decide whether to let 
an event through or not.) It's not a statement about how Filters work in 
general.

If you can confirm which parts of the logging documentation you think need to 
be changed (feel free to suggest alternative wording or additional wording) 
I'll certainly try to make those parts clearer.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7535>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to