devctrl.utility.log.PackageFilter#

class PackageFilter(name='')[source]#

Bases: Filter

Allows you to enable debug logs only for certain packages

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

filter

Determine if the specified record is to be logged.

Attributes

DEBUG_FOR_PKG = ['prsctrl-gui', 'prsctrl', 'devctrl', '__main__', 'mqutil']#
THRESHOLD_OTHER = 30#
__annotations__ = {}#
__dict__ = mappingproxy({'__module__': 'devctrl.utility.log', '__firstlineno__': 26, '__doc__': '\nAllows you to enable debug logs only for certain packages\n', 'DEBUG_FOR_PKG': ['prsctrl-gui', 'prsctrl', 'devctrl', '__main__', 'mqutil'], 'THRESHOLD_OTHER': 30, 'filter': <function PackageFilter.filter>, '__static_attributes__': (), '__annotations__': {}})#
__firstlineno__ = 26#
__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.

__module__ = 'devctrl.utility.log'#
__static_attributes__ = ()#
__weakref__#

list of weak references to the object

filter(record: LogRecord) bool[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.