Skip to content

Commit

Permalink
logging
Browse files Browse the repository at this point in the history
  • Loading branch information
seallard committed Aug 6, 2024
1 parent 5b18786 commit 33f4a87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions genotype_api/api/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

class DBSessionMiddleware(BaseHTTPMiddleware):
def __init__(self, app):
logger.info("Initialising DBSessionMiddleware")
logger.error("Initialising DBSessionMiddleware")
super().__init__(app)

async def dispatch(self, request: Request, call_next):
try:
logger.info("In dispatch")
logger.error("In dispatch")
response = await call_next(request)
finally:
logger.info("Closing session")
logger.error("Closing session")
close_session()
return response

0 comments on commit 33f4a87

Please sign in to comment.