Skip to content

Commit

Permalink
Silence strava-protocol info logs
Browse files Browse the repository at this point in the history
  • Loading branch information
obscurerichard committed Jan 1, 2025
1 parent 7dd8d52 commit 74c480f
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 74c480f

Please sign in to comment.