From 74c480f0b7d19471c67ccb9432ee947c2221e734 Mon Sep 17 00:00:00 2001 From: Richard Bullington-McGuire Date: Tue, 31 Dec 2024 22:57:48 -0500 Subject: [PATCH] Silence strava-protocol info logs --- freezing/sync/config.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/freezing/sync/config.py b/freezing/sync/config.py index a8d8350..02cc25b 100644 --- a/freezing/sync/config.py +++ b/freezing/sync/config.py @@ -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 " # 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)