mirror of https://github.com/fafhrd91/actix-web
Log internal server errors with an ERROR log level
This commit is contained in:
parent
9d7732e2d8
commit
b5066e8fc5
|
@ -52,6 +52,9 @@ impl Response<Body> {
|
|||
#[inline]
|
||||
pub fn from_error(error: Error) -> Response {
|
||||
let mut resp = error.as_response_error().render_response();
|
||||
if resp.head.status == StatusCode::INTERNAL_SERVER_ERROR {
|
||||
error!("Internal Server Error: {:?}", error);
|
||||
}
|
||||
resp.error = Some(error);
|
||||
resp
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue