On this page
  1. logging.debug
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

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

REPL Inspect

from logging import debug
help(debug)

Linked from

Related notes