mirror of https://github.com/fafhrd91/actix-web
Logger middleware: don't log 500 internal server errors, as Actix now logs them always
This commit is contained in:
parent
b5066e8fc5
commit
dd55617edc
|
@ -15,7 +15,7 @@ use time;
|
||||||
|
|
||||||
use crate::dev::{BodySize, MessageBody, ResponseBody};
|
use crate::dev::{BodySize, MessageBody, ResponseBody};
|
||||||
use crate::error::{Error, Result};
|
use crate::error::{Error, Result};
|
||||||
use crate::http::{HeaderName, HttpTryFrom};
|
use crate::http::{HeaderName, HttpTryFrom, StatusCode};
|
||||||
use crate::service::{ServiceRequest, ServiceResponse};
|
use crate::service::{ServiceRequest, ServiceResponse};
|
||||||
use crate::HttpResponse;
|
use crate::HttpResponse;
|
||||||
|
|
||||||
|
@ -204,8 +204,10 @@ where
|
||||||
let res = futures::try_ready!(self.fut.poll());
|
let res = futures::try_ready!(self.fut.poll());
|
||||||
|
|
||||||
if let Some(error) = res.response().error() {
|
if let Some(error) = res.response().error() {
|
||||||
|
if res.response().head().status != StatusCode::INTERNAL_SERVER_ERROR {
|
||||||
debug!("Error in response: {:?}", error);
|
debug!("Error in response: {:?}", error);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if let Some(ref mut format) = self.format {
|
if let Some(ref mut format) = self.format {
|
||||||
for unit in &mut format.0 {
|
for unit in &mut format.0 {
|
||||||
|
|
Loading…
Reference in New Issue