From 5c7209af3945054fd1232dd5d96601a4208d63b6 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Thu, 30 Mar 2023 21:42:06 +0200 Subject: allow log level to be easily set in container --- container/entrypoint | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'container/entrypoint') diff --git a/container/entrypoint b/container/entrypoint index 0d404d6..c7f3b2d 100644 --- a/container/entrypoint +++ b/container/entrypoint @@ -47,6 +47,12 @@ if [[ ! -f "$CONFIG" ]] ; then if [[ -v EMAIL_PASSWORD ]] ; then sed -i '/^email\.password =/c email.password = '"$EMAIL_PASSWORD" "$CONFIG" fi + + if [[ -v LOGLEVEL ]] ; then + # We are only changing the fietsboek log level here, as SQLAlchemy + # produces a lot of noise. + sed -i '/\[logger_fietsboek\]/{N;s/level = .*/level = '"$LOGLEVEL"'/}' "$CONFIG" + fi fi # Make sure the data schema is up to date, or rather initialize it if this is -- cgit v1.2.3