add extended logging feats

This commit is contained in:
joBr99
2023-11-26 12:14:15 +01:00
parent bc3d58d406
commit 900e1aef46
4 changed files with 26 additions and 16 deletions

View File

@@ -14,4 +14,16 @@ if test -f "$CONFIG_FILE"; then
else
cp /usr/bin/mqtt-manager/panels.yaml.example $CONFIG_FILE
fi
python /usr/bin/mqtt-manager/main.py
declare LOGLEVEL
declare logtofile
LOGLEVEL=$(bashio::config 'loglevel')
logtofile=$(bashio::config 'logtofile')
export LOGLEVEL
if [[ "$logtofile" == "true" ]]; then
python /usr/bin/mqtt-manager/main.py 2>&1 | tee /config/out.log
else
python /usr/bin/mqtt-manager/main.py
fi