teleapi / FileStream /server /Middlewares /logging_middleware.py
privateone's picture
Addition of Middlewares
6ccc851
raw
history blame
237 Bytes
import logging
from aiohttp import web
@web.middleware
async def logging_middleware(request, handler):
"""Log each request."""
logging.info(f"Incoming request: {request.method} {request.path}")
return await handler(request)