mirror of
https://github.com/fmtr/haco.git
synced 2026-10-26 19:01:51 -04:00
Add environment variable log level
This commit is contained in:
parent
82b878dd36
commit
636436763c
1 changed files with 4 additions and 1 deletions
|
|
@ -1,10 +1,13 @@
|
|||
import hashlib
|
||||
import logging
|
||||
import os
|
||||
|
||||
from haco import constants, tuya
|
||||
from haco.tasmota import Tasmota
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
|
||||
LOG_LEVEL = os.environ.get('HACO_LOG_LEVEL', 'INFO')
|
||||
|
||||
logging.basicConfig(level=LOG_LEVEL, format='%(asctime)s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S')
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue