mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-10-24 04:57:10 +08:00
refactor(log): 优化访问日志启用属性名
This commit is contained in:
@@ -174,7 +174,7 @@ public abstract class AbstractLogHandler implements LogHandler {
|
|||||||
public void accessLogStart(AccessLogContext accessLogContext) {
|
public void accessLogStart(AccessLogContext accessLogContext) {
|
||||||
AccessLogProperties properties = accessLogContext.getProperties().getAccessLog();
|
AccessLogProperties properties = accessLogContext.getProperties().getAccessLog();
|
||||||
// 是否需要打印 规则: 是否打印开关 或 放行路径
|
// 是否需要打印 规则: 是否打印开关 或 放行路径
|
||||||
if (!properties.isPrint() || accessLogContext.getProperties()
|
if (!properties.isEnabled() || accessLogContext.getProperties()
|
||||||
.isMatch(accessLogContext.getRequest().getPath())) {
|
.isMatch(accessLogContext.getRequest().getPath())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class AccessLogProperties {
|
|||||||
* 不记录请求日志也支持开启打印访问日志
|
* 不记录请求日志也支持开启打印访问日志
|
||||||
* </p>
|
* </p>
|
||||||
*/
|
*/
|
||||||
private boolean isPrint = false;
|
private boolean enabled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否打印请求参数(body/query/form)
|
* 是否打印请求参数(body/query/form)
|
||||||
@@ -82,12 +82,12 @@ public class AccessLogProperties {
|
|||||||
*/
|
*/
|
||||||
private List<String> sensitiveParams = new ArrayList<>();
|
private List<String> sensitiveParams = new ArrayList<>();
|
||||||
|
|
||||||
public boolean isPrint() {
|
public boolean isEnabled() {
|
||||||
return isPrint;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPrint(boolean print) {
|
public void setEnabled(boolean enabled) {
|
||||||
isPrint = print;
|
this.enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isPrintRequestParam() {
|
public boolean isPrintRequestParam() {
|
||||||
|
|||||||
Reference in New Issue
Block a user