-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Hide internal logging exceptions #5848
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the logic has to happen before: https://github.com/DataDog/integrations-core/blob/master/datadog_checks_downloader/datadog_checks/downloader/__main__.py#L7 And having it in |
Codecov Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @FlorianVeaux !
So, hold on, I'm a little confused. What is the effect of this? Would this swallow logging.exception()
calls?
No this only swallows "internal" errors from the logging module. For example on Python2 this would display an error if you don't set
Python will show the error "No handler could be found for logger 'foo'" |
So, sorry, why do we need this in relation to this issue? |
There are two issues in the The first one is that it shows a warning when The second issue is that the This is not an issue on Python3 though as it has a default handler to log on stdout |
Oh, I see, thanks for the explanation! Hmm, then we need to file another issue for the second bug in |
Also, would be great if you add a short note to add context around this LoC, if you don't mind terribly much, please... |
Yes, the issue I opened mentions both problems: secure-systems-lab/securesystemslib#210 But my PR doesn't fix that second part as it requires more knowledge about the library.
I think I've given all the details in both the issue and the PR on the securesystemlib repo. |
What does this PR do?
If an internal logging exception is raised while using the datadog_checks_downloader, we should not display it to the end user.
Motivation
Additional Notes
Review checklist (to be filled by reviewers)
changelog/
andintegration/
labels attached