1
0
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:
Nikolay Kim 2018-02-18 09:57:57 -08:00
parent 0da382a7a4
commit 816c6fb0e0

View File

@ -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() {
if self.resp.status().is_server_error() {
error!("Error occured during request handling: {}", err);
} else {
warn!("Error occured during request handling: {}", err); warn!("Error occured during request handling: {}", err);
}
if log_enabled!(Debug) { if log_enabled!(Debug) {
debug!("{:?}", err); debug!("{:?}", err);
} }