From e294d69cdb323e8105f99d464456cf28be588608 Mon Sep 17 00:00:00 2001
From: Charles7c
Date: Wed, 26 Mar 2025 21:29:30 +0800
Subject: [PATCH] =?UTF-8?q?refactor(log):=20=E4=BC=98=E5=8C=96=E8=AE=BF?=
=?UTF-8?q?=E9=97=AE=E6=97=A5=E5=BF=97=E5=90=AF=E7=94=A8=E5=B1=9E=E6=80=A7?=
=?UTF-8?q?=E5=90=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../starter/log/handler/AbstractLogHandler.java | 2 +-
.../starter/log/model/AccessLogProperties.java | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/continew-starter-log/continew-starter-log-core/src/main/java/top/continew/starter/log/handler/AbstractLogHandler.java b/continew-starter-log/continew-starter-log-core/src/main/java/top/continew/starter/log/handler/AbstractLogHandler.java
index 007f0799..2cfe6c76 100644
--- a/continew-starter-log/continew-starter-log-core/src/main/java/top/continew/starter/log/handler/AbstractLogHandler.java
+++ b/continew-starter-log/continew-starter-log-core/src/main/java/top/continew/starter/log/handler/AbstractLogHandler.java
@@ -174,7 +174,7 @@ public abstract class AbstractLogHandler implements LogHandler {
public void accessLogStart(AccessLogContext accessLogContext) {
AccessLogProperties properties = accessLogContext.getProperties().getAccessLog();
// 是否需要打印 规则: 是否打印开关 或 放行路径
- if (!properties.isPrint() || accessLogContext.getProperties()
+ if (!properties.isEnabled() || accessLogContext.getProperties()
.isMatch(accessLogContext.getRequest().getPath())) {
return;
}
diff --git a/continew-starter-log/continew-starter-log-core/src/main/java/top/continew/starter/log/model/AccessLogProperties.java b/continew-starter-log/continew-starter-log-core/src/main/java/top/continew/starter/log/model/AccessLogProperties.java
index d4d523b6..0eceb524 100644
--- a/continew-starter-log/continew-starter-log-core/src/main/java/top/continew/starter/log/model/AccessLogProperties.java
+++ b/continew-starter-log/continew-starter-log-core/src/main/java/top/continew/starter/log/model/AccessLogProperties.java
@@ -34,7 +34,7 @@ public class AccessLogProperties {
* 不记录请求日志也支持开启打印访问日志
*
*/
- private boolean isPrint = false;
+ private boolean enabled = false;
/**
* 是否打印请求参数(body/query/form)
@@ -82,12 +82,12 @@ public class AccessLogProperties {
*/
private List sensitiveParams = new ArrayList<>();
- public boolean isPrint() {
- return isPrint;
+ public boolean isEnabled() {
+ return enabled;
}
- public void setPrint(boolean print) {
- isPrint = print;
+ public void setEnabled(boolean enabled) {
+ this.enabled = enabled;
}
public boolean isPrintRequestParam() {