From bf9d47c4991377ec5b4f0353c541c5550a4ce690 Mon Sep 17 00:00:00 2001 From: Andrew Baldwin Date: Wed, 25 Sep 2024 15:44:58 +0200 Subject: [PATCH] Log 400-404 requests as DEBUG level --- locust/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locust/web.py b/locust/web.py index a8b0a1ca95..4fe6dc677c 100644 --- a/locust/web.py +++ b/locust/web.py @@ -150,7 +150,7 @@ def handle_exception(error): error_message = str(error) error_code = getattr(error, "code", 500) logger.log( - logging.INFO if error_code <= 404 else logging.ERROR, + logging.DEBUG if error_code <= 404 else logging.ERROR, f"UI got request for {request.path}, but it resulted in a {error_code}: {error.name}", ) return make_response(error_message, error_code)