Open
Description
Hi ,
am using asgi-logger
and extended AccessLoggerMiddleware
to customise the logging in the application and when I upgrade fastapi to 0.109.x version getting issue on mypy, any suggestions ?
error: Argument 1 to "Middleware" has incompatible type "type[AccessLoggerMiddleware]"; expected "type[_MiddlewareClass[[]]]" [arg-type]
middleware = [
Middleware(
CORSMiddleware,
allow_origins=["*"],
allow_methods=["PUT", "GET", "DELETE"],
allow_headers=["Authorization"],
),
Middleware(access_logger.AccessLoggerMiddleware),
]
and this is my customise version of logging.
import structlog
from asgi_logger import middleware as asl
from asgiref.typing import ASGI3Application, HTTPScope
class AccessLoggerMiddleware(asl.AccessLoggerMiddleware):
//code
Metadata
Metadata
Assignees
Labels
No labels