I am trying to capture logs to a file but I noticed that only logs produced by request.logger.info but my console is also printing some additional logs such as each request reponse. It it possible to also capture that and attach it to a file handler?
@get("/heartbeat", status_code=HTTP_204_NO_CONTENT, sync_to_thread=False)
def heartbeat(request: Request) -> None:
request.logger.info("Heartbeat")
return None
(I want both logs from the screenshot in my file handler but currently only getting bottom one)