Logging config now accepts the override key, under which Python-compatible logging settings can be provided. The overridden settings take precedence over logging settings like enable_access_log, etc. default handler that utilises the log_format setting can be used in the override. For example, to log everything a file, one can set up own file handler and assign it to the root logger:
Logging config now accepts the
override
key, under which Python-compatible logging settings can be provided. The overridden settings take precedence over logging settings likeenable_access_log
, etc.default
handler that utilises thelog_format
setting can be used in the override. For example, to log everything a file, one can set up own file handler and assign it to the root logger:Or, log access logs to file in generic format while logging everything else to stdout in json:
Additionally, the
color
setting key is added to control whether uvicorn and structlog logs should be colorised.