api.log¶
Structured logs (JSON, or readable with LOG_FORMAT=console) to stdout and to a rotating file, for the API and the worker, plus one log line per HTTP request.
Functions¶
|
Safe to call twice: the API process also imports the worker's Celery app. |
|
|
|
Module Contents¶
- api.log.setup_logging() None¶
Safe to call twice: the API process also imports the worker’s Celery app.
- async api.log.logging_middleware(request: fastapi.Request, call_next)¶
- async api.log.global_exception_handler(request: fastapi.Request, exc: Exception)¶