diff options
author | Daniel Schadt <kingdread@gmx.de> | 2023-03-30 21:42:06 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2023-03-30 21:42:06 +0200 |
commit | 5c7209af3945054fd1232dd5d96601a4208d63b6 (patch) | |
tree | 0b5a67e5e6dca0d9be83ba42e965a837da4cec66 /container/entrypoint | |
parent | 60a1585a37bfee43e3d6c7cac002eeee85768c5f (diff) | |
download | fietsboek-5c7209af3945054fd1232dd5d96601a4208d63b6.tar.gz fietsboek-5c7209af3945054fd1232dd5d96601a4208d63b6.tar.bz2 fietsboek-5c7209af3945054fd1232dd5d96601a4208d63b6.zip |
allow log level to be easily set in container
Diffstat (limited to 'container/entrypoint')
-rw-r--r-- | container/entrypoint | 6 |
1 files changed, 6 insertions, 0 deletions
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 |