MCPcopy Index your code
hub / github.com/RustPython/RustPython / _log

Method _log

Lib/logging/__init__.py:1643–1667  ·  view source on GitHub ↗

Low-level logging routine which creates a LogRecord and then calls all the handlers of this logger to handle the record.

(self, level, msg, args, exc_info=None, extra=None, stack_info=False,
             stacklevel=1)

Source from the content-addressed store, hash-verified

1641 return rv
1642
1643 def _log(self, level, msg, args, exc_info=None, extra=None, stack_info=False,
1644 stacklevel=1):
1645 """
1646 Low-level logging routine which creates a LogRecord and then calls
1647 all the handlers of this logger to handle the record.
1648 """
1649 sinfo = None
1650 if _srcfile:
1651 #IronPython doesn't track Python frames, so findCaller raises an
1652 #exception on some versions of IronPython. We trap it here so that
1653 #IronPython can use logging.
1654 try:
1655 fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel)
1656 except ValueError: # pragma: no cover
1657 fn, lno, func = "(unknown file)", 0, "(unknown function)"
1658 else: # pragma: no cover
1659 fn, lno, func = "(unknown file)", 0, "(unknown function)"
1660 if exc_info:
1661 if isinstance(exc_info, BaseException):
1662 exc_info = (type(exc_info), exc_info, exc_info.__traceback__)
1663 elif not isinstance(exc_info, tuple):
1664 exc_info = sys.exc_info()
1665 record = self.makeRecord(self.name, level, fn, lno, msg, args,
1666 exc_info, func, extra, sinfo)
1667 self.handle(record)
1668
1669 def handle(self, record):
1670 """

Callers 7

debugMethod · 0.95
infoMethod · 0.95
warningMethod · 0.95
errorMethod · 0.95
criticalMethod · 0.95
logMethod · 0.95
_logMethod · 0.45

Calls 4

findCallerMethod · 0.95
makeRecordMethod · 0.95
handleMethod · 0.95
isinstanceFunction · 0.85

Tested by

no test coverage detected