From d35d7eb30c9e536bead96d50d45ff6def219f84f Mon Sep 17 00:00:00 2001 From: aofall <10182210+aofall@users.noreply.github.com> Date: Fri, 31 May 2024 15:05:16 +0800 Subject: [PATCH] fix: Disable accesslog while the config is false (#14257) --- .../main/java/org/apache/dubbo/rpc/filter/AccessLogFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/AccessLogFilter.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/AccessLogFilter.java index 1469630781..d0b0b4b392 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/AccessLogFilter.java +++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/AccessLogFilter.java @@ -108,7 +108,7 @@ public class AccessLogFilter implements Filter { public Result invoke(Invoker invoker, Invocation inv) throws RpcException { String accessLogKey = invoker.getUrl().getParameter(Constants.ACCESS_LOG_KEY); boolean isFixedPath = invoker.getUrl().getParameter(ACCESS_LOG_FIXED_PATH_KEY, true); - if (StringUtils.isEmpty(accessLogKey)) { + if (StringUtils.isEmpty(accessLogKey) || "false".equalsIgnoreCase(accessLogKey)) { // Notice that disable accesslog of one service may cause the whole application to stop collecting // accesslog. // It's recommended to use application level configuration to enable or disable accesslog if dynamically