Jelajahi Sumber

rpc 响应日志优化

WANG 6 tahun lalu
induk
melakukan
c49b9d42cb

+ 3 - 1
src/main/java/cn/com/qmth/examcloud/web/cloud/CloudClientSupport.java

@@ -206,7 +206,9 @@ public abstract class CloudClientSupport {
 			if (INTERFACE_LOG.isDebugEnabled() && getLogProperties().isNormalResponseLogEnable()) {
 				String respEntityBody = respEntity.getBody();
 				int responseJsonMaxSize = getLogProperties().getResponseLogJsonMaxSize();
-				if (null != respEntityBody && respEntityBody.length() > responseJsonMaxSize) {
+				if (null == respEntityBody) {
+					INTERFACE_LOG.debug("[CALL-RESP]. response= void");
+				} else if (respEntityBody.length() > responseJsonMaxSize) {
 					INTERFACE_LOG.debug("[CALL-RESP]. response= too large");
 				} else {
 					INTERFACE_LOG.debug("[CALL-RESP]. response=" + respEntityBody);