compass.utilities.logs.LocationFilter#
- class LocationFilter(location)[source]#
Bases:
FilterFilter down to logs for a specific location
- Parameters:
location (
str) – Location identifier. For example,"El Paso Colorado".
Methods
filter(record)Filter logging record
- filter(record)[source]#
Filter logging record
- Parameters:
record (
logging.LogRecord) – Log record containing the log message + default attributes. Must have alocationattribute that is a string identifier, or this function will returnFalseevery time. Thelocationidentifier will be checked against the filter’s location attribute to determine the output result.- Returns:
bool– If the record’slocationattribute matches the filter’slocationattribute.