On this page
logging.info
Prev: logging.Handler | Up: logging | Next: logging.log
Rel: logging.addLevelName, logging.basicConfig, logging.BufferingFormatter, logging.captureWarnings
Ref: docs.python.org — logging.info
Tags: #public #python3 #stdlib #logging
Import
import logging
from logging import info
Signature & Overview
logging.info(msg, *args, **kwargs)
Log a message with severity 'INFO' on the root logger. If the logger has no handlers, call basicConfig() to add a console handler with a pre-defined format.
Usage
import logging
assert logging.INFO == 20 and callable(logging.info)
Gotchas
- Root-logger convenience function: Prefer
logger = logging.getLogger(__name__); logger.info(...)in real modules.
REPL Inspect
from logging import info
help(info)
Linked from
Related notes
- tuts/python3/stdlib_module/logging/Handler Linked here; links to this page; shared tags: #logging, #stdlib
- tuts/python3/stdlib_module/logging/log Linked here; links to this page; shared tags: #logging, #stdlib
- tuts/python3/stdlib_module/logging Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/logging/addLevelName Linked here; shared tags: #logging, #stdlib
- tuts/python3/stdlib_module/logging/basicConfig Linked here; shared tags: #logging, #stdlib
- tuts/python3/stdlib_module/logging/BufferingFormatter Linked here; shared tags: #logging, #stdlib
- tuts/python3/stdlib_module/logging/captureWarnings Linked here; shared tags: #logging, #stdlib
- tuts/python3/stdlib_module/logging/critical shared tags: #logging, #stdlib
- tuts/python3/stdlib_module/logging/debug shared tags: #logging, #stdlib
- tuts/python3/stdlib_module/logging/disable shared tags: #logging, #stdlib