navigate.log_files.filters.NonPerfFilter
- class navigate.log_files.filters.NonPerfFilter(name='')
Bases:
Filter
A custom logging filter to exclude non-performance messages.
This filter is designed to be used with the Python logging module. It excludes log records whose messages do not start with “Performance” or “Spec.”
- __init__(name='')
Initialize a filter.
Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no name is specified, allow every event.
Methods
__init__
([name])Initialize a filter.
filter
(record)Filter out non-performance messages
- filter(record)
Filter out non-performance messages
- Parameters:
record (logging.LogRecord) – The log record to filter
- Returns:
True if the record should be logged, False otherwise
- Return type:
bool