diff --git a/backend-python/media_impact_monitor/api.py b/backend-python/media_impact_monitor/api.py index 8be7da9e..c79db1db 100644 --- a/backend-python/media_impact_monitor/api.py +++ b/backend-python/media_impact_monitor/api.py @@ -52,7 +52,7 @@ async def app_lifespan(app: FastAPI): yield -app = FastAPI(**metadata) +app = FastAPI(**metadata, lifespan=app_lifespan) app.add_middleware( CORSMiddleware, @@ -63,15 +63,6 @@ async def app_lifespan(app: FastAPI): ) -@app.on_event("startup") -async def startup_event(): - logger = logging.getLogger("uvicorn.access") - console_formatter = AccessFormatter( - "{asctime} {levelprefix} {message}", style="{", use_colors=True - ) - logger.handlers[0].setFormatter(console_formatter) - - @app.get("/", include_in_schema=False) def read_root(): return RedirectResponse(url="/docs")