lib.logutils

This module contains utils to be used in logging

class lib.logutils.DuplicateFilter[source]

Bases: object

This class builds a filter to be used in logging.yaml to configure logging Since Python 3.2 it only needs to provide a filter function taking a LogRecord object as argument. The filter function here will remember module, levelno and msg of the current record until next call. If a record immediately following provides the same entries, then it won’t be displayed. It is useful to suppress the generation of huge logs due to a non captured error that is only of time limited nature such as connection problems to other devices. This will however not work if there are two interchanging records. The size of a logfile should then be limited as a seconds measurement Returning True tells logging to suppress this logentry, whereas False will include the record into further processing and eventual output

filter(record)[source]
class lib.logutils.Filter(name='')[source]

Bases: object

This class builds a filter to be used in logging.yaml to configure logging

Returning True tells logging to suppress this logentry, whereas False will include the record into further processing and eventual output

filter(record)[source]