From 07a89458e5026d9dc29e6c3797fcacb8e2aa55d6 Mon Sep 17 00:00:00 2001 From: aofall Date: Thu, 30 May 2024 14:44:43 +0800 Subject: [PATCH] fix: Disable accesslog while the config is false --- .../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 14696307819..d0b0b4b3923 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 AccessLogFilter() {} 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