MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / warning

Function warning

tools/python-3.11.9-amd64/Lib/logging/__init__.py:2118–2126  ·  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

2116 error(msg, *args, exc_info=exc_info, **kwargs)
2117
2118def warning(msg, *args, **kwargs):
2119 """
2120 Log a message with severity 'WARNING' on the root logger. If the logger has
2121 no handlers, call basicConfig() to add a console handler with a pre-defined
2122 format.
2123 """
2124 if len(root.handlers) == 0:
2125 basicConfig()
2126 root.warning(msg, *args, **kwargs)
2127
2128def warn(msg, *args, **kwargs):
2129 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