flowstab.logger

Attributes

logger

Classes

CustomPathnameFilter

Filter instances are used to perform arbitrary filtering of LogRecords.

Functions

get_logger()

Return the logger instance.

setup_logger([log_level])

Set up the logger for the package.

Module Contents

class flowstab.logger.CustomPathnameFilter(name='')[source]

Bases: logging.Filter

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.

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.

filter(record)[source]

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.

flowstab.logger.get_logger()[source]

Return the logger instance.

flowstab.logger.setup_logger(log_level=logging.INFO)[source]

Set up the logger for the package.

Parameters:

log_level (int) – The logging level (e.g., logging.DEBUG, logging.INFO).

flowstab.logger.logger[source]