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

logging.log

Prev: logging.info | Up: logging | Next: logging.Logger
Rel: logging.addLevelName, logging.basicConfig, logging.BufferingFormatter, logging.captureWarnings
Ref: docs.python.org — logging.log
Tags: #public #python3 #stdlib #logging


Import

import logging
from logging import log

Signature & Overview

logging.log(level, msg, *args, **kwargs)

Log 'msg % args' with the integer severity 'level' 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

# Dynamic level logging: logging.log(level, msg, *args)
assert callable(logging.log)

Gotchas

REPL Inspect

from logging import log
help(log)

Linked from

Related notes