diff --git a/pig-gateway/src/main/java/com/github/pig/gateway/service/impl/LogSendServiceImpl.java b/pig-gateway/src/main/java/com/github/pig/gateway/service/impl/LogSendServiceImpl.java index 0128316c..9cc5899d 100644 --- a/pig-gateway/src/main/java/com/github/pig/gateway/service/impl/LogSendServiceImpl.java +++ b/pig-gateway/src/main/java/com/github/pig/gateway/service/impl/LogSendServiceImpl.java @@ -63,7 +63,7 @@ public class LogSendServiceImpl implements LogSendService { } //正常发送服务异常解析 - if (requestContext.getResponseStatusCode() != HttpStatus.SC_OK + if (requestContext.getResponseStatusCode() == HttpStatus.SC_INTERNAL_SERVER_ERROR && requestContext.getResponseDataStream() != null) { InputStream inputStream = requestContext.getResponseDataStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -87,7 +87,6 @@ public class LogSendServiceImpl implements LogSendService { IoUtil.close(baos); IoUtil.close(inputStream); } - } //网关内部异常