- class lib.logutils.DuplicateFilter
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
- class lib.logutils.Filter(name='', module='', msg='', timestamp='', invert=False)
This class builds a filter to be used in logging.yaml to configure logging name: name of the logger object (regex) module: logger module (regex) msg: logger message (regex) invert: defines whether the filter suppresses the entries matching the above parameters or suppresses everything else (bool) returns: bool
Returning True tells logging to suppress this logentry, whereas False will include the record into further processing and eventual output
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.