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