mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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:
parent
7f1de72e08
commit
7bcc8d7ce7
6 changed files with 16 additions and 12 deletions
|
@ -24,9 +24,10 @@ Logging
|
|||
-------
|
||||
|
||||
Tests also require the `logging.test.conf` logging configuration
|
||||
file to be used. To prepare, you can override `logging.conf`:
|
||||
file to be used. You can specify the `LOG_CONFIG` environment
|
||||
variable to override:
|
||||
|
||||
$ cp -vf logging.test.conf logging.conf
|
||||
$ export LOG_CONFIG=logging.test.conf
|
||||
|
||||
`logging.test.conf` enables debug logging for the aurweb package,
|
||||
for which we run tests against.
|
||||
|
@ -85,9 +86,10 @@ Run tests from the project root.
|
|||
|
||||
$ cd /path/to/aurweb
|
||||
|
||||
Ensure you have the proper `AUR_CONFIG` exported:
|
||||
Ensure you have the proper `AUR_CONFIG` and `LOG_CONFIG` exported:
|
||||
|
||||
$ export AUR_CONFIG=conf/config
|
||||
$ export LOG_CONFIG=logging.test.conf
|
||||
|
||||
To run `sharness` shell test suites (requires Arch Linux):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue