From 02d33129c86d88275cd328323fc78ea937d8cb38 Mon Sep 17 00:00:00 2001 From: Leon <82407168+sed-i@users.noreply.github.com> Date: Wed, 20 Mar 2024 13:42:35 -0400 Subject: [PATCH] Less log spam from imported libs (#573) --- src/charm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/charm.py b/src/charm.py index 4d267feb..e5a6988b 100755 --- a/src/charm.py +++ b/src/charm.py @@ -77,6 +77,10 @@ CA_CERT_PATH = f"{PROMETHEUS_DIR}/ca.cert" WEB_CONFIG_PATH = f"{PROMETHEUS_DIR}/prometheus-web-config.yml" +# To keep a tidy debug-log, we suppress some DEBUG/INFO logs from some imported libs, +# even when charm logging is set to a lower level. +logging.getLogger("httpx").setLevel(logging.WARNING) +logging.getLogger("httpcore").setLevel(logging.WARNING) logger = logging.getLogger(__name__)