Skip to content

Commit

Permalink
Merge branch 'dev' into issue-46-fix-mediacloud
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpomerenke committed Apr 10, 2024
2 parents b4c89c4 + 2bedf16 commit f7da3ba
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions backend-python/media_impact_monitor/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@
@asynccontextmanager
async def app_lifespan(app: FastAPI):
logger = logging.getLogger("uvicorn.access")
console_formatter = AccessFormatter(
"{asctime} {levelprefix} {message}", style="{", use_colors=True
)
logger.handlers[0].setFormatter(console_formatter)
if logger.handlers:
console_formatter = AccessFormatter(
"{asctime} {levelprefix} {message}", style="{", use_colors=True
)
logger.handlers[0].setFormatter(console_formatter)
yield


Expand Down

0 comments on commit f7da3ba

Please sign in to comment.