-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
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
Logging approach creates redundant events on each exception #258
Labels
Comments
Hi @Kaveshnikov,
The excellent suggestion, I will accept that. Thank you. |
Some examples to further information:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello. I use this library in one of my projects. I have noticed that across the library codebase on each exception 2 logging records are created. This approach complicates integrations with errors monitoring solutions, for example Sentry. An event will be created on each logging record. For example, a record with message "unexpected error" (created here) doesn't provide any valuable information for the investigation. Also,
logging.Logger.exception()
method is not supposed to be used like that. It will get the Exception object implicitly and log the traceback by default. So, we only need to provide some meaningful message as an argument for this method.I suggest to refactor all places with such an approach to create only one logging record. For example, in this place it will be like this:
The text was updated successfully, but these errors were encountered: