Filters

Callables that provide message filters for the MetlogClient. Each provider accepts needed filter configuration values, and returns a filter function usable by a MetlogClient instance.

Each filter accepts a single msg dictionary argument and returns a boolean value: True if a message should be delivered, False if a message should not be delivered. Note that the msg dictionary may be mutated by the filter.

metlog.filters.severity_max_provider(severity)[source]

Filter if message severity is greater than specified severity.

metlog.filters.type_blacklist_provider(types)[source]

Filter if message type is in the types value.

metlog.filters.type_severity_max_provider(types)[source]

Filter if message type has specified maximum severity value and message severity is higher than this maximum. Each keyword argument key should be a message type name, and each keyword argument value should be the maximum allowed severity for that message type.

metlog.filters.type_whitelist_provider(types)[source]

Filter if message type is NOT in the types value.

Read the Docs v: latest
Versions
latest
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.