Merge pull request #73 from emresaglam/loglevel

Added LOG_LEVEL env variable for the docker
This commit is contained in:
Walter A. Boring IV 2021-12-03 08:02:15 -05:00 committed by GitHub
commit 950c62f49b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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