Skip to content

Commit e294d69

Browse files
committed
refactor(log): 优化访问日志启用属性名
1 parent 89a347f commit e294d69

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

continew-starter-log/continew-starter-log-core/src/main/java/top/continew/starter/log/handler/AbstractLogHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private void processInclude(Set<Include> includes, Log logAnnotation) {
174174
public void accessLogStart(AccessLogContext accessLogContext) {
175175
AccessLogProperties properties = accessLogContext.getProperties().getAccessLog();
176176
// 是否需要打印 规则: 是否打印开关 或 放行路径
177-
if (!properties.isPrint() || accessLogContext.getProperties()
177+
if (!properties.isEnabled() || accessLogContext.getProperties()
178178
.isMatch(accessLogContext.getRequest().getPath())) {
179179
return;
180180
}

continew-starter-log/continew-starter-log-core/src/main/java/top/continew/starter/log/model/AccessLogProperties.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class AccessLogProperties {
3434
* 不记录请求日志也支持开启打印访问日志
3535
* </p>
3636
*/
37-
private boolean isPrint = false;
37+
private boolean enabled = false;
3838

3939
/**
4040
* 是否打印请求参数(body/query/form)
@@ -82,12 +82,12 @@ public class AccessLogProperties {
8282
*/
8383
private List<String> sensitiveParams = new ArrayList<>();
8484

85-
public boolean isPrint() {
86-
return isPrint;
85+
public boolean isEnabled() {
86+
return enabled;
8787
}
8888

89-
public void setPrint(boolean print) {
90-
isPrint = print;
89+
public void setEnabled(boolean enabled) {
90+
this.enabled = enabled;
9191
}
9292

9393
public boolean isPrintRequestParam() {

0 commit comments

Comments
 (0)