🔨 优化系统配置逻辑.
This commit is contained in:
@@ -50,12 +50,12 @@ public class AppLogConfig {
|
||||
/**
|
||||
* 是否生成详细的执行日志
|
||||
*/
|
||||
private final ConfigRef<Boolean> execDetailLog;
|
||||
private final ConfigRef<Boolean> execDetailEnabled;
|
||||
|
||||
public AppLogConfig(ConfigStore configStore) {
|
||||
this.trackerLoadLines = configStore.int32(ConfigKeys.LOG_TRACKER_LOAD_LINES);
|
||||
this.trackerLoadInterval = configStore.int32(ConfigKeys.LOG_TRACKER_LOAD_INTERVAL);
|
||||
this.execDetailLog = configStore.bool(ConfigKeys.LOG_EXEC_DETAIL_LOG);
|
||||
this.execDetailEnabled = configStore.bool(ConfigKeys.LOG_EXEC_DETAIL_ENABLED);
|
||||
}
|
||||
|
||||
public Integer getTrackerLoadLines() {
|
||||
@@ -66,8 +66,8 @@ public class AppLogConfig {
|
||||
return trackerLoadInterval.value;
|
||||
}
|
||||
|
||||
public Boolean getExecDetailLog() {
|
||||
return execDetailLog.value;
|
||||
public Boolean getExecDetailEnabled() {
|
||||
return execDetailEnabled.value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ public class ExecTaskHandler implements IExecTaskHandler {
|
||||
* @return handler
|
||||
*/
|
||||
private IExecCommandHandler createCommandHandler(Long execHostId) {
|
||||
if (Booleans.isTrue(appLogConfig.getExecDetailLog())) {
|
||||
if (Booleans.isTrue(appLogConfig.getExecDetailEnabled())) {
|
||||
// 详细日志
|
||||
return new ExecCommandDetailHandler(execHostId, execLog, builtParams, timeoutChecker);
|
||||
} else {
|
||||
|
||||
@@ -59,6 +59,7 @@ public interface UserCacheKeyDefine {
|
||||
CacheKeyDefine LOGIN_FAILED_COUNT = new CacheKeyBuilder()
|
||||
.key("user:login-failed:{}")
|
||||
.desc("用户登录失败次数 ${username}")
|
||||
.noPrefix()
|
||||
.type(Integer.class)
|
||||
.struct(RedisCacheStruct.STRING)
|
||||
.build();
|
||||
|
||||
@@ -49,6 +49,7 @@ public interface AlarmPolicyCacheKeyDefine {
|
||||
CacheKeyDefine ALARM_RULE_SILENCE = new CacheKeyBuilder()
|
||||
.key("alarm:silence:{}:{}")
|
||||
.desc("告警规则沉默标志 ${agentKey} ${ruleId}")
|
||||
.noPrefix()
|
||||
.type(Long.class)
|
||||
.struct(RedisCacheStruct.STRING)
|
||||
.build();
|
||||
|
||||
Reference in New Issue
Block a user