mirror of https://github.com/fafhrd91/actix-web
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:
parent
3a0fb3f89e
commit
170ff454d7
|
@ -78,7 +78,7 @@ impl Response<Body> {
|
||||||
pub fn from_error(error: Error) -> Response<Body> {
|
pub fn from_error(error: Error) -> Response<Body> {
|
||||||
let mut resp = error.as_response_error().error_response();
|
let mut resp = error.as_response_error().error_response();
|
||||||
if resp.head.status == StatusCode::INTERNAL_SERVER_ERROR {
|
if resp.head.status == StatusCode::INTERNAL_SERVER_ERROR {
|
||||||
error!("Internal Server Error: {:?}", error);
|
debug!("Internal Server Error: {:?}", error);
|
||||||
}
|
}
|
||||||
resp.error = Some(error);
|
resp.error = Some(error);
|
||||||
resp
|
resp
|
||||||
|
|
Loading…
Reference in New Issue