Move logging config to a file.

By default logging configuration is defined by
resources/default_logging.yaml. Very noisy loggers (like the
uvicorn.access logger) are kept out of the console and UI logs by
default. Developers (or weird users) can customize their default logging
config by copying the file to resources/logging.yaml and editing as
needed. It would be preferable to load this file form the Liberation
user directory, but because first-time initialization requires the UI,
we want to configure logging before we necessarily know where to find
that.
This commit is contained in:
Dan Albert
2022-02-20 14:13:16 -08:00
parent c16ca40894
commit 9e6b1cf716
4 changed files with 53 additions and 27 deletions

View File

@@ -17,7 +17,8 @@ class Server(uvicorn.Server):
app=app,
host=ServerSettings.get().server_bind_address,
port=ServerSettings.get().server_port,
log_level="info",
# Configured explicitly with default_logging.yaml or logging.yaml.
log_config=None,
)
)