read loglevel from env variable LOGLEVEL

This commit is contained in:
2021-10-10 19:50:25 +02:00
parent e78dd9e1cb
commit ccb34e8c06
2 changed files with 11 additions and 0 deletions
+2
View File
@@ -3,4 +3,6 @@ from . import core
from . import devices
from . import utils
from .utils import logcfg
+9
View File
@@ -0,0 +1,9 @@
import os
import logzero
loglevel = os.environ.get("LOGLEVEL", "WARNING").upper()
logzero.loglevel(loglevel)