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_LOGGINGis enabled. - Simplify processor list in
structlog.configure. - Set
disable_existing_loggers. - Update
README.mdto describeLOG_LEVELandCONSOLE_LOGGINGusage.
A part of: https://gitlab.developers.cam.ac.uk/uis/devops/iam/authentication/infrastructure/-/issues/168
Edited by Eugene E.