logging-too-few-args / E1206#

Message emitted:

Not enough arguments for logging format string

Description:

Used when a logging format string is given too few arguments.

Correct code:

import logging

try:
    function()
except Exception as e:
    logging.error('%s error occurred: %s', type(e), e)
    raise

Problematic code:

import logging

try:
    function()
except Exception as e:
    logging.error('%s error occurred: %s', e)  # [logging-too-few-args]
    raise

Created by the logging checker.