On this page
logging.debug
Prev: logging.critical | Up: logging | Next: logging.disable
Rel: logging.addLevelName, logging.basicConfig, logging.BufferingFormatter, logging.captureWarnings
Ref: docs.python.org — logging.debug
Tags: #public #python3 #stdlib #logging
Import
import logging
from logging import debug
Signature & Overview
logging.debug(msg, *args, **kwargs)
Log a message with severity 'DEBUG' 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
# Logs a DEBUG (level 10) message on the root logger (hidden unless level <= DEBUG)
assert logging.DEBUG == 10 and callable(logging.debug)
Gotchas
- Hidden by default: The root logger starts at
WARNING(30), sologging.debug()emits nothing untilbasicConfig(level=logging.DEBUG)is called.
REPL Inspect
from logging import debug
help(debug)
Linked from
Related notes
- tuts/python3/stdlib_module/logging/critical Linked here; links to this page; shared tags: #logging, #stdlib
- tuts/python3/stdlib_module/logging/disable 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/error shared tags: #logging, #stdlib
- tuts/python3/stdlib_module/logging/exception shared tags: #logging, #stdlib
- tuts/python3/stdlib_module/logging/fatal shared tags: #logging, #stdlib