Describe the bug
Not all logs propagate to the root logger when serving with uvicorn.
In the OpenFlexure server we fix this by doing:
log_config = copy(uvicorn.config.LOGGING_CONFIG)
log_config["loggers"]["uvicorn"]["propagate"] = True
log_config["loggers"]["uvicorn.access"]["propagate"] = True
...
uvicorn.run(
server.app,
host=args.host,
port=args.port,
log_config=log_config,
timeout_graceful_shutdown=2,
)
Note that log_config["loggers"]["uvicorn.access"]["propagate"] = True is a bit noisy, we filter out most of them when writing log files.
Describe the bug
Not all logs propagate to the root logger when serving with uvicorn.
In the OpenFlexure server we fix this by doing:
Note that
log_config["loggers"]["uvicorn.access"]["propagate"] = Trueis a bit noisy, we filter out most of them when writing log files.