question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

boto3.resources.action logger too verbose at INFO level

See original GitHub issue

The boto logger boto3.resources.action, which propagates to root logger, logs the entire uploaded bytes at INFO level.

First, this is already a security risk. I could have confidential information in those bytes.

Second, logging this at INFO level may be a bit too much, no? What if my bytes object is several GBs? I will have several GBs on one line in my log file. In my opinion at the very least the level should be at least TRACE when logging the bytes.

Workaround, to mute the logger like so:

# mute too verbose boto3.resources.action logger
boto_resources_logger = getLogger('boto3.resources.action')
boto_resources_logger.setLevel('ERROR')

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:5
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
alexgleasoncommented, Feb 24, 2018

Please close this ticket. My Python project is looking like this otherwise:

screenshot from 2018-02-24 17 43 29

Snyk is reporting 1 vulnerability until this issue is closed.

1reaction
Dmitrii-Icommented, Feb 26, 2018

Closing as requested.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Boto3 reference — Boto3 Docs 1.26.32 documentation - AWS
Create a low-level service client by name using the default session. ... import boto3 >>> boto3.set_stream_logger('boto3.resources', logging.INFO).
Read more >
Disable boto logging without modifying the boto files
Boto uses logging configuration files (e.g. /etc/boto.cfg , ~/.boto ) so see if ... It is recommended to disable DEBUG and INFO messages...
Read more >
Logging HOWTO — Python 3.11.1 documentation
setLevel() specifies the lowest-severity log message a logger will handle, where debug is the lowest built-in severity level and critical is the highest...
Read more >
Configure logging for AWS IoT Wireless resources
INFO : Provides high-level information about the flow of things. Logs include INFO and ERROR information. DISABLED : Disables all logging. resource.
Read more >
boto3: How to Use Any AWS Service with Python - Dashbird
Level of abstraction in boto3, aws-cli, and botocore based on S3 as an example ... resources are not thread-safe, so if you plan...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found