PY3.E1205
Logging too many args
Used when a logging format string is given too many arguments.
Noncompliant Code:
Copy
import logging
try:
function()
except Exception as e:
logging.error('Error occurred: %s', type(e), e) # [logging-too-many-args]
raise
Compliant Code:
Copy
import logging
try:
function()
except Exception as e:
logging.error('%s error occurred: %s', type(e), e)
raise