We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exc_info=True
Hastily-written log messages often use the exception in the message:
try: float() except Exception as exc: logging.info("Floating failed: %s", exc)
This is not a great pattern as str(exc) reveals little info - no stack trace! Better to use exc_info=True.
str(exc)
Let’s detect exc or str(exc) used in arguments and recommend exc_info=True instead. type(exc) is okay as a parameter.
exc
type(exc)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Hastily-written log messages often use the exception in the message:
This is not a great pattern as
str(exc)
reveals little info - no stack trace! Better to useexc_info=True
.Let’s detect
exc
orstr(exc)
used in arguments and recommendexc_info=True
instead.type(exc)
is okay as a parameter.The text was updated successfully, but these errors were encountered: