mirror of
https://github.com/actix/actix-web.git
synced 2025-04-25 02:54:06 +00:00
Log internal server errors with an ERROR log level
This commit is contained in:
parent
9d7732e2d8
commit
b5066e8fc5
1 changed files with 3 additions and 0 deletions
|
@ -52,6 +52,9 @@ impl Response<Body> {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn from_error(error: Error) -> Response {
|
pub fn from_error(error: Error) -> Response {
|
||||||
let mut resp = error.as_response_error().render_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.error = Some(error);
|
||||||
resp
|
resp
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue