Package logging :: Class Filterer
[hide private]
[frames] | no frames]

_ClassType Filterer

Known Subclasses:

A base class for loggers and handlers which allows them to share common code.

Instance Methods [hide private]
 
__init__(self)
Initialize the list of filters to be an empty list.
 
addFilter(self, filter)
Add the specified filter to this handler.
 
removeFilter(self, filter)
Remove the specified filter from this handler.
 
filter(self, record)
Determine if a record is loggable by consulting all the filters.
Method Details [hide private]

filter(self, record)

 

Determine if a record is loggable by consulting all the filters.

The default is to allow the record to be logged; any filter can veto this and the record is then dropped. Returns a zero value if a record is to be dropped, else non-zero.