feat: support LOG_CONFIG environment variable

This variable allows users to override the logging.conf used
for Python logging configuration. By default, this is set
to logging.conf, which is a production config. LOG_CONFIG
is treated relative to [options] aurwebdir.

This patch allows us to specify the logging config as opposed
to copying over logging.conf in our test docker and gitlab
test scripts, as well as ease-of-testing as a developer.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-01-18 06:39:42 -08:00
parent 7f1de72e08
commit 7bcc8d7ce7
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
6 changed files with 16 additions and 12 deletions

View file

@ -1,6 +1,4 @@
#!/bin/bash
set -eou pipefail
cp -vf logging.prod.conf logging.conf
exec "$@"

View file

@ -1,9 +1,6 @@
#!/bin/bash
set -eou pipefail
# Set test logging.
cp -vf "logging.test.conf" "logging.conf"
# We use the root user for testing in Docker.
# The test user must be able to create databases and drop them.
aurweb-config set database user 'root'