MCPcopy Create free account
hub / github.com/StackStorm/st2 / LogLevelFilter

Class LogLevelFilter

st2common/st2common/logging/filters.py:67–80  ·  view source on GitHub ↗

Filter which excludes log messages which match the provided log levels.

Source from the content-addressed store, hash-verified

65
66
67class LogLevelFilter(logging.Filter):
68 """
69 Filter which excludes log messages which match the provided log levels.
70 """
71
72 def __init__(self, log_levels):
73 self._log_levels = log_levels
74
75 def filter(self, record):
76 level = record.levelno
77 if level in self._log_levels:
78 return False
79
80 return True

Callers 2

setupFunction · 0.90
setupFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected