fix: Disable accesslog while the config is false (#14257)
This commit is contained in:
parent
63e5bef4fa
commit
d35d7eb30c
|
|
@ -108,7 +108,7 @@ public class AccessLogFilter implements Filter {
|
||||||
public Result invoke(Invoker<?> invoker, Invocation inv) throws RpcException {
|
public Result invoke(Invoker<?> invoker, Invocation inv) throws RpcException {
|
||||||
String accessLogKey = invoker.getUrl().getParameter(Constants.ACCESS_LOG_KEY);
|
String accessLogKey = invoker.getUrl().getParameter(Constants.ACCESS_LOG_KEY);
|
||||||
boolean isFixedPath = invoker.getUrl().getParameter(ACCESS_LOG_FIXED_PATH_KEY, true);
|
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
|
// Notice that disable accesslog of one service may cause the whole application to stop collecting
|
||||||
// accesslog.
|
// accesslog.
|
||||||
// It's recommended to use application level configuration to enable or disable accesslog if dynamically
|
// It's recommended to use application level configuration to enable or disable accesslog if dynamically
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue