api.log ======= .. py:module:: api.log .. autoapi-nested-parse:: 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 --------- .. autoapisummary:: api.log.setup_logging api.log.logging_middleware api.log.global_exception_handler Module Contents --------------- .. py:function:: setup_logging() -> None Safe to call twice: the API process also imports the worker's Celery app. .. py:function:: logging_middleware(request: fastapi.Request, call_next) :async: .. py:function:: global_exception_handler(request: fastapi.Request, exc: Exception) :async: