Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: log incoming requests too (#6050)
Kian Jones789f6cf9cd69
diff --git a/letta/server/rest_api/middleware/logging.py b/letta/server/rest_api/middleware/logging.pyindex ea781b9eb..68cb402be 100644--- a/letta/server/rest_api/middleware/logging.py+++ b/letta/server/rest_api/middleware/logging.py@@ -67,6 +67,17 @@ class LoggingMiddleware(BaseHTTPMiddleware):if context:update_log_context(**context)+ logger.info(+ f"Incoming request: {request.method} {request.url.path}",+ extra={+ "method": request.method,+ "url": str(request.url),+ "path": request.url.path,+ "query_params": dict(request.query_params),+ "client_host": request.client.host if request.client else None,+ },+ )+response = await call_next(request)return response