WANG 5 anni fa
parent
commit
57c6214c70

+ 9 - 0
src/main/java/cn/com/qmth/examcloud/web/interceptor/ApiFlowLimitedInterceptor.java

@@ -124,6 +124,10 @@ public class ApiFlowLimitedInterceptor implements HandlerInterceptor {
 		}
 		expression = expression.trim();
 
+		if (LOG.isDebugEnabled()) {
+			LOG.debug("expression=" + expression + " ; mapping=" + apiInfo.getMapping());
+		}
+
 		Map<String, Object> env = Maps.newHashMap();
 		env.put("mean", apiStatusInfo.getMean());
 		env.put("max", apiStatusInfo.getMax());
@@ -155,6 +159,11 @@ public class ApiFlowLimitedInterceptor implements HandlerInterceptor {
 					LOG.error("error value. key= " + key, e);
 				}
 
+				if (LOG.isDebugEnabled()) {
+					LOG.debug(
+							"minCallRate=" + curMinCallRate + "; mapping=" + apiInfo.getMapping());
+				}
+
 				if (oneMinuteRate < curMinCallRate) {
 					return true;
 				}