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.
This commit is contained in:
LukeMathWalker 2021-05-02 21:44:28 +01:00
parent 3a0fb3f89e
commit 170ff454d7
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ impl Response<Body> {
pub fn from_error(error: Error) -> Response<Body> {
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