ara-collection
ara-collection copied to clipboard
Need to update settings.yaml template for logging changes
See:
The releases notes say:
- There have been fixes to logging which requires changes to the
server's settings.yaml or LOGGING configuration. (#367)
A warning will be printed if the configuration file must be updated
and it can be updated manually or by generating a new configuration file.
The "new" default looks like this:
---
# This is a default settings template generated by ARA.
# To use a settings file such as this one, you need to export the
# ARA_SETTINGS environment variable like so:
# $ export ARA_SETTINGS="/home/zuul/.ara-tests/server/settings.yaml"
default:
ALLOWED_HOSTS:
- ::1
- 127.0.0.1
- localhost
BASE_DIR: /home/zuul/.ara-tests/server
CORS_ORIGIN_ALLOW_ALL: false
CORS_ORIGIN_REGEX_WHITELIST: []
CORS_ORIGIN_WHITELIST:
- http://127.0.0.1:8000
- http://localhost:3000
CSRF_TRUSTED_ORIGINS: []
DATABASE_CONN_MAX_AGE: 0
DATABASE_ENGINE: django.db.backends.sqlite3
DATABASE_HOST: null
DATABASE_NAME: /home/zuul/.ara-tests/server/ansible.sqlite
DATABASE_OPTIONS: {}
DATABASE_PASSWORD: null
DATABASE_PORT: null
DATABASE_USER: null
DEBUG: true
DISTRIBUTED_SQLITE: false
DISTRIBUTED_SQLITE_PREFIX: ara-report
DISTRIBUTED_SQLITE_ROOT: /var/www/logs
EXTERNAL_AUTH: false
LOGGING:
disable_existing_loggers: false
formatters:
normal:
format: '%(asctime)s %(levelname)s %(name)s: %(message)s'
handlers:
console:
class: logging.StreamHandler
formatter: normal
level: DEBUG
stream: ext://sys.stdout
loggers:
ara:
handlers:
- console
level: DEBUG
propagate: 0
version: 1
LOG_LEVEL: DEBUG
PAGE_SIZE: 100
READ_LOGIN_REQUIRED: false
SECRET_KEY: testing
TIME_ZONE: Etc/UTC
WRITE_LOGIN_REQUIRED: false
Maybe we only need to change the default var to match: https://github.com/ansible-community/ara-collection/blob/cfde8262df84676168e1bf23ff65cdbb7fec5098/roles/ara_api/defaults/main.yaml#L152