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

logging.error

Prev: logging.disable | Up: logging | Next: logging.exception
Rel: logging.addLevelName, logging.basicConfig, logging.BufferingFormatter, logging.captureWarnings
Ref: docs.python.org — logging.error
Tags: #public #python3 #stdlib #logging


Import

import logging
from logging import error

Signature & Overview

logging.error(msg, *args, **kwargs)

Log a message with severity 'ERROR' 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 an ERROR (level 40) message on the root logger
assert logging.ERROR == 40 and callable(logging.error)

Gotchas

REPL Inspect

from logging import error
help(error)

Linked from

Related notes