Skip to content

Files

Latest commit

 

History

History
24 lines (14 loc) · 554 Bytes

logging-too-many-args.md

File metadata and controls

24 lines (14 loc) · 554 Bytes

Pattern: Too many logging arguments

Issue: -

Description

Calls to logging that do not match formats against args may lead to confusion as code will not work as expected. Extra arguments will not be shown and missing arguments will raise IndexError. Update code so that formats and args are in sync.

Example of incorrect code:

logging.warn('%s, %s', 1, 2, 3)

Example of correct code:

logging.warn('%s, %s', 1, 2)

Further Reading