Make it possible to set the log level through env LOG_LEVEL

This commit is contained in:
polyfloyd 2025-03-23 13:49:13 +01:00
parent 2273253aef
commit 99cfea6d62

View file

@ -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)