feat(logging): update logging configuration and format
Refactor configure_logging
to incorporate conditional handlers. Add color support in console output and toggle between console and JSON formatting based on the CONSOLE_LOGGING
environment variable.
- Enable toggling between console and JSON formatters based on
CONSOLE_LOGGING
. - Add color support to console logging when
CONSOLE_LOGGING
is enabled. - Simplify processor list in
structlog.configure
. - Set
disable_existing_loggers
. - Update
README.md
to describeLOG_LEVEL
andCONSOLE_LOGGING
usage.
A part of: https://gitlab.developers.cam.ac.uk/uis/devops/iam/authentication/infrastructure/-/issues/168
Edited by E. Evstafiev