alogging.filters.exclude module

class alogging.filters.exclude.ExcludeFilter(name='', excludes=None, operator=None)[source]

Bases: logging.Filter

Filter records with user provided values for record fields

ie, to exclude log records from loop polling records from the ‘asyncio’ module, with name=’asyncio’, module=’base_events’, func_name=’_run_once’

excludes is a list of tuples (field_name, value)

check_value(field_name, value, record)[source]
filter(record)[source]

Determine if the specified record is to be logged.

Is the specified record to be logged? Returns 0 for no, nonzero for yes. If deemed appropriate, the record may be modified in-place.