sawmill.filterer.pattern¶
-
class
sawmill.filterer.pattern.
Pattern
(pattern, key='name', mode='include')[source]¶ Bases:
sawmill.filterer.base.Filterer
Filter logs using pattern matching.
-
__init__
(pattern, key='name', mode='include')[source]¶ Initialise filterer with pattern and key to test.
If pattern is a string it will be converted to a compiled regular expression instance.
mode can be either ‘exclude’ or ‘include’. If set to ‘exclude’ then any log matching the pattern will be filtered. Conversely, if set to ‘include’ then any log not matching the pattern will be filtered.
-
EXCLUDE
= 'exclude'¶
-
INCLUDE
= 'include'¶
-