From cf45a5658bc95caa6803c028c83f05895d65cade Mon Sep 17 00:00:00 2001 From: Hugo Bollon Date: Mon, 18 Sep 2023 12:03:41 +0200 Subject: [PATCH] feat: add env variable to set log-level --- launch.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/launch.sh b/launch.sh index d36f1b9..e5e6eda 100644 --- a/launch.sh +++ b/launch.sh @@ -8,4 +8,10 @@ envsubst < config.yml > /etc/blackbox_exporter/config.yml rm -f /etc/blackbox_exporter/config_web.yml || : envsubst < config_web.yml > /etc/blackbox_exporter/config_web.yml -/bin/blackbox_exporter --config.file=/etc/blackbox_exporter/config.yml --web.config.file=/etc/blackbox_exporter/config_web.yml \ No newline at end of file +if [[ -z "${APP_LOG_LEVEL}" ]]; then + LOG_LEVEL="info" +else + LOG_LEVEL="${APP_LOG_LEVEL}" +fi + +/bin/blackbox_exporter --log.level=${LOG_LEVEL} --config.file=/etc/blackbox_exporter/config.yml --web.config.file=/etc/blackbox_exporter/config_web.yml