Added LOG_LEVEL env variable for the docker

This commit is contained in:
Emre Saglam 2021-12-02 17:08:41 -08:00
parent 5e50792e80
commit 7aaa002a0e
2 changed files with 8 additions and 1 deletions

View File

@ -13,6 +13,12 @@ if [ ! -z "${APRSD_PLUGINS}" ]; then
done
fi
if [ -z "${LOG_LEVEL}" ] || [[ ! "${LOG_LEVEL}" =~ ^(CRITICAL|ERROR|WARNING|INFO)$ ]]; then
LOG_LEVEL="DEBUG"
fi
echo "Log level is set to ${LOG_LEVEL}";
# check to see if there is a config file
APRSD_CONFIG="/config/aprsd.yml"
if [ ! -e "$APRSD_CONFIG" ]; then
@ -20,4 +26,4 @@ if [ ! -e "$APRSD_CONFIG" ]; then
aprsd sample-config > $APRSD_CONFIG
fi
exec aprsd server -c $APRSD_CONFIG --loglevel DEBUG
exec aprsd server -c $APRSD_CONFIG --loglevel ${LOG_LEVEL}

View File

@ -9,3 +9,4 @@ services:
environment:
- TZ=America/New_York
- APRS_PLUGINS=aprsd-slack-plugin>=1.0.2
- LOG_LEVEL=ERROR