From 964cb00d1b0c15a34434cfc99eaa5af763ee2fe1 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 29 May 2024 09:31:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20mqttc=E8=AF=BB=E5=8F=96loglevel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mqttc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mqttc.py b/mqttc.py index c5825aa..a299740 100644 --- a/mqttc.py +++ b/mqttc.py @@ -21,7 +21,7 @@ import conf LOG_FILE = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'mqttc.log') -logging.basicConfig(level=conf.LOG_LEVEL, +logging.basicConfig(level=getattr(logging, conf.LOG_LEVEL.upper(), logging.INFO), format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', handlers=[ logging.StreamHandler(sys.stdout), # Log to console