mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-30 18:44:35 +01:00
log 5xx responses as error
This commit is contained in:
parent
0da382a7a4
commit
816c6fb0e0
@ -460,7 +460,11 @@ impl<S: 'static, H> ProcessResponse<S, H> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if let Some(err) = self.resp.error() {
|
if let Some(err) = self.resp.error() {
|
||||||
warn!("Error occured during request handling: {}", err);
|
if self.resp.status().is_server_error() {
|
||||||
|
error!("Error occured during request handling: {}", err);
|
||||||
|
} else {
|
||||||
|
warn!("Error occured during request handling: {}", err);
|
||||||
|
}
|
||||||
if log_enabled!(Debug) {
|
if log_enabled!(Debug) {
|
||||||
debug!("{:?}", err);
|
debug!("{:?}", err);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user