Skip to content

Commit

Permalink
Merge pull request #73 from freezingsaddles/silence-strava-protocol-i…
Browse files Browse the repository at this point in the history
…nfo-logs

Silence strava-protocol info logs
  • Loading branch information
obscurerichard authored Jan 1, 2025
2 parents 7dd8d52 + 74c480f commit 582e8bd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions freezing/sync/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,13 @@ def init_logging(loglevel: int = logging.INFO, color: bool = False):
else:
l.setLevel(logging.INFO)

# This logger is very noisy and spits out WARNING level
# messages that are not very useful, such as:
# The stravalib.attributes logger is very noisy and spits out
# WARNING level messages that are not very useful, such as:
# "WARNING [stravalib.attributes.EntityAttribute] Unable to set attribute visibility on entity <Activity id=13209828474 name=None>"
# Silence it except for CRITICAL messages.

logging.getLogger("stravalib.attributes").setLevel(logging.CRITICAL)
# stravalib.protocl leaks client_secrets into logs, which is bad in production especially
logging.getLogger("stravalib.protocol").setLevel(logging.WARNING)


statsd = DogStatsd(host=config.DATADOG_HOST, port=config.DATADOG_PORT)

0 comments on commit 582e8bd

Please sign in to comment.