From 8568fcb70a097c2cf684d906152212c0ad2472b2 Mon Sep 17 00:00:00 2001 From: aitbc Date: Sun, 3 May 2026 23:06:11 +0200 Subject: [PATCH] fix: remove keyword args from logger.info in PerformanceLoggingMiddleware Changed logger.info to use string formatting instead of keyword arguments to avoid Logger._log() errors. --- aitbc/middleware/performance.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/aitbc/middleware/performance.py b/aitbc/middleware/performance.py index 878f8f7d..661973c4 100644 --- a/aitbc/middleware/performance.py +++ b/aitbc/middleware/performance.py @@ -28,11 +28,7 @@ class PerformanceLoggingMiddleware(BaseHTTPMiddleware): # Log performance metrics logger.info( - "Request performance", - method=request.method, - path=request.url.path, - status_code=response.status_code, - duration_ms=round(duration * 1000, 2), + f"Request performance - Method: {request.method}, Path: {request.url.path}, Status: {response.status_code}, Duration: {round(duration * 1000, 2)}ms" ) # Add performance header