Skip to content

Commit

Permalink
fix(log): 修复日志全局 includes 配置会被局部修改的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c authored and gitee-org committed Aug 30, 2024
2 parents 5e0eea2 + 52fc9d0 commit eac5c1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class LogProperties {
/**
* 包含信息
*/
private Set<Include> includes = new HashSet<>(Include.defaultIncludes());
private Set<Include> includes = Include.defaultIncludes();

/**
* 放行路由
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import top.continew.starter.log.interceptor.autoconfigure.LogProperties;

import java.time.Clock;
import java.util.HashSet;
import java.util.Set;

/**
Expand Down Expand Up @@ -115,7 +116,8 @@ public void afterCompletion(@NonNull HttpServletRequest request,
* @return 日志包含信息
*/
private Set<Include> getIncludes(Log methodLog, Log classLog) {
Set<Include> includeSet = logProperties.getIncludes();
Set<Include> oriIncludeSet = logProperties.getIncludes();
Set<Include> includeSet = new HashSet<>(oriIncludeSet);
if (null != classLog) {
this.processInclude(includeSet, classLog);
}
Expand Down

0 comments on commit eac5c1f

Please sign in to comment.