MCPcopy Index your code
hub / github.com/python/cpython / warning

Function warning

Lib/logging/__init__.py:2195–2203  ·  view source on GitHub ↗

Log a message with severity 'WARNING' on the root logger. If the logger has no handlers, call basicConfig() to add a console handler with a pre-defined format.

(msg, *args, **kwargs)

Source from the content-addressed store, hash-verified

2193 error(msg, *args, exc_info=exc_info, **kwargs)
2194
2195def warning(msg, *args, **kwargs):
2196 """
2197 Log a message with severity 'WARNING' on the root logger. If the logger has
2198 no handlers, call basicConfig() to add a console handler with a pre-defined
2199 format.
2200 """
2201 if len(root.handlers) == 0:
2202 basicConfig()
2203 root.warning(msg, *args, **kwargs)
2204
2205def warn(msg, *args, **kwargs):
2206 warnings.warn("The 'warn' function is deprecated, "

Callers 1

warnFunction · 0.85

Calls 2

basicConfigFunction · 0.85
warningMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…