From 99cfea6d621fb8a389ddc234d44a568a88e9c424 Mon Sep 17 00:00:00 2001 From: polyfloyd Date: Sun, 23 Mar 2025 13:49:13 +0100 Subject: [PATCH] Make it possible to set the log level through env LOG_LEVEL --- inflatinator/__main__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/inflatinator/__main__.py b/inflatinator/__main__.py index a37d434..075b7e2 100644 --- a/inflatinator/__main__.py +++ b/inflatinator/__main__.py @@ -1,10 +1,12 @@ +import logging +import os import revbank import sys -import logging def main(product_file): - logging.basicConfig(level=logging.INFO) + log_level = os.environ.get('LOG_LEVEL', 'INFO').upper() + logging.basicConfig(level=log_level) logging.getLogger("requests").setLevel(logging.WARNING) logging.getLogger("urllib3").setLevel(logging.WARNING)