Noisy logs on credentials loading #2662
-
I am getting tons of logs from boto forwarded when credentials are being loaded. Example: It seems to be because of this logging here: botocore/botocore/credentials.py Line 1114 in 5f09808 Any ideas on how to suppress this? I am using boto3 usually like this: import boto3
session = boto3.session.Session(region_name=some_aws_region_config_var) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @aalvrz here is the documentation on boto3 logging: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/boto3.html#boto3.set_stream_logger You could customize which logging level to show, for example logging.WARNING. We don’t recommend logging in production as the logs could contain sensitive information. |
Beta Was this translation helpful? Give feedback.
-
@tim-finnigan Thanks for the response. What is the correct way to disable all logging from boto3? Does |
Beta Was this translation helpful? Give feedback.
Hi @aalvrz here is the documentation on boto3 logging: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/boto3.html#boto3.set_stream_logger
You could customize which logging level to show, for example logging.WARNING. We don’t recommend logging in production as the logs could contain sensitive information.