From 170ff454d753f815626a33d40b30b52efeeafd23 Mon Sep 17 00:00:00 2001 From: LukeMathWalker Date: Sun, 2 May 2021 21:44:28 +0100 Subject: [PATCH] Reduce the level of the emitted log line from `error` to `debug`. The framework already provides a `Logger` middleware for this purpose - there is no need to add another concern to `from_error`. Furthermore, it leads to a duplicate log line when a logging middleware is used, with no option to silence this particular log record. --- actix-http/src/response.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actix-http/src/response.rs b/actix-http/src/response.rs index a3ab1175c..e11ceb18f 100644 --- a/actix-http/src/response.rs +++ b/actix-http/src/response.rs @@ -78,7 +78,7 @@ impl Response { pub fn from_error(error: Error) -> Response { let mut resp = error.as_response_error().error_response(); if resp.head.status == StatusCode::INTERNAL_SERVER_ERROR { - error!("Internal Server Error: {:?}", error); + debug!("Internal Server Error: {:?}", error); } resp.error = Some(error); resp