DuplicateFilter¶

class DuplicateFilter(name='')[source]¶

Define an object to filter duplicate logs.

The DuplicateFilter filters logs to avoid printing them multiple times while running code in a loop.

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

Filter input record.

filter(record)[source]¶

Filter input record.

Parameters:
Return type:

bool