MCPcopy Create free account
hub / github.com/EasyIME/PIME / filter

Method filter

python/python3/tornado/testing.py:753–766  ·  view source on GitHub ↗
(self, record: logging.LogRecord)

Source from the content-addressed store, hash-verified

751 self.orig_level = None # type: Optional[int]
752
753 def filter(self, record: logging.LogRecord) -> bool:
754 if record.exc_info:
755 self.logged_stack = True
756 message = record.getMessage()
757 if self.regex.match(message):
758 if self.level is not None and record.levelno != self.level:
759 app_log.warning(
760 "Got expected log message %r at unexpected level (%s vs %s)"
761 % (message, logging.getLevelName(self.level), record.levelname)
762 )
763 return True
764 self.matched = True
765 return False
766 return True
767
768 def __enter__(self) -> "ExpectLog":
769 if self.level is not None and self.level < self.logger.getEffectiveLevel():

Callers 15

zFunction · 0.45
IaFunction · 0.45
DFunction · 0.45
zFunction · 0.45
jFunction · 0.45
OeFunction · 0.45
tFunction · 0.45
itFunction · 0.45
ltFunction · 0.45

Calls 2

getMessageMethod · 0.80
matchMethod · 0.45

Tested by

no test coverage detected