Skip to content
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

fix: override botocore logging to a NullHandler #1538

Merged
merged 1 commit into from
Nov 15, 2019

Conversation

jfuss
Copy link
Contributor

@jfuss jfuss commented Nov 15, 2019

Issue #, if available:

Description of changes:

Checklist:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.


SamCliLogger.configure_logger(sam_cli_logger, sam_cli_formatter, logging.INFO)
SamCliLogger.configure_logger(lambda_builders_logger, sam_cli_formatter, logging.INFO)
SamCliLogger.configure_null_logger(botocore_logger)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this silence all logs, including debug logs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.python.org/3.6/howto/logging.html#configuring-logging-for-a-library explains it. Basically it will prevent the library’s logged event being output to sys.stderr and is documented as "A do-nothing handler". This is also what boto3 is doing but botocore is not (for whatever reason).

From reading the docs, my understanding is yes.

@jfuss jfuss force-pushed the fix/logging-from-botocore branch from 5849735 to 19920fb Compare November 15, 2019 17:27
@sriram-mv sriram-mv changed the base branch from develop to release-v0.32.0 November 15, 2019 17:46
@sriram-mv sriram-mv changed the base branch from release-v0.32.0 to develop November 15, 2019 17:46
@sanathkr sanathkr changed the base branch from develop to release-v0.32.0 November 15, 2019 20:33
@sanathkr sanathkr force-pushed the fix/logging-from-botocore branch from 19920fb to e071989 Compare November 15, 2019 20:51
@sanathkr sanathkr merged commit 6ed68b2 into aws:release-v0.32.0 Nov 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants