logging.Filter¶
-
class
logging.Filter(name='')[source]¶ Filter instances are used to perform arbitrary filtering of LogRecords.
Loggers and Handlers can optionally use Filter instances to filter records as desired. The base filter class only allows events which are below a certain point in the logger hierarchy. For example, a filter initialized with “A.B” will allow events logged by loggers “A.B”, “A.B.C”, “A.B.C.D”, “A.B.D” etc. but not “A.BB”, “B.A.B” etc. If initialized with the empty string, all events are passed.
Methods¶
__format__ |
default object formatter |
__init__([name]) |
Initialize a filter. |
__new__((S, ...) |
|
__reduce__ |
helper for pickle |
__reduce_ex__ |
helper for pickle |
__sizeof__(() -> int) |
size of object in memory, in bytes |
__subclasshook__ |
Abstract classes can override this to customize issubclass(). |
filter(record) |
Determine if the specified record is to be logged. |