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 | |
parent | 60a1585a37bfee43e3d6c7cac002eeee85768c5f (diff) | |
download | fietsboek-5c7209af3945054fd1232dd5d96601a4208d63b6.tar.gz fietsboek-5c7209af3945054fd1232dd5d96601a4208d63b6.tar.bz2 fietsboek-5c7209af3945054fd1232dd5d96601a4208d63b6.zip |
allow log level to be easily set in container
-rw-r--r-- | container/entrypoint | 6 | ||||
-rw-r--r-- | doc/administration/docker.rst | 1 |
2 files changed, 7 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 diff --git a/doc/administration/docker.rst b/doc/administration/docker.rst index 06073ca..ed44a05 100644 --- a/doc/administration/docker.rst +++ b/doc/administration/docker.rst @@ -81,6 +81,7 @@ Environment variable Setting ``EMAIL_SMTP_URL`` ``email.smtp_url`` ``EMAIL_USERNAME`` ``email.username`` ``EMAIL_PASSWORD`` ``email.password`` +``LOGLEVEL`` ``[logger_fietsboek] level`` =============================== =============================== .. [#f1] Required. |