do not use format string with logging functions

Metadata

ID: python-best-practices/logging-no-format

Language: Python

Severity: Notice

Category: Best Practices

Description

Avoid using format string with the format method when logging information.

Non-Compliant Code Examples

import logging
import shlex

logging.info("error {0} {1}".format(plop, plip))  # use instead logging.info("error %s", plop)

Compliant Code Examples

import logging

logging.info("wfwef")