log improvement (#11753)
This commit is contained in:
parent
139f4f2377
commit
21f8065073
@ -93,8 +93,8 @@ public abstract class ConnectionControlManager {
|
||||
&& ruleStorageProxy.getExternalStorage().getConnectionRule() != null) {
|
||||
localRuleContent = ruleStorageProxy.getExternalStorage().getConnectionRule();
|
||||
if (StringUtils.isNotBlank(localRuleContent)) {
|
||||
Loggers.CONTROL
|
||||
.info("Found persist disk connection rule content on start up ,value ={}", localRuleContent);
|
||||
Loggers.CONTROL.info("Found persist disk connection rule content on start up ,value ={}",
|
||||
localRuleContent);
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,9 +139,7 @@ public abstract class ConnectionControlManager {
|
||||
Collectors.toMap(ConnectionMetricsCollector::getName, ConnectionMetricsCollector::getTotalCount));
|
||||
int totalCount = metricsTotalCount.values().stream().mapToInt(Integer::intValue).sum();
|
||||
|
||||
Loggers.CONNECTION.info(String.format("ConnectionMetrics, totalCount = %s, detail = %s", totalCount,
|
||||
metricsTotalCount.toString()));
|
||||
|
||||
Loggers.CONNECTION.info("ConnectionMetrics, totalCount = {}, detail = {}", totalCount, metricsTotalCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ public class DefaultConnectionControlManager extends ConnectionControlManager {
|
||||
@Override
|
||||
public void applyConnectionLimitRule(ConnectionControlRule connectionControlRule) {
|
||||
super.connectionControlRule = connectionControlRule;
|
||||
Loggers.CONTROL.info("Connection control rule updated to ->" + (this.connectionControlRule == null ? null
|
||||
: JacksonUtils.toJson(this.connectionControlRule)));
|
||||
Loggers.CONTROL.info("Connection control rule updated to -> {}",
|
||||
(this.connectionControlRule == null ? null : JacksonUtils.toJson(this.connectionControlRule)));
|
||||
Loggers.CONTROL.warn("Connection control updated, But connection control manager is no limit implementation.");
|
||||
}
|
||||
|
||||
|
@ -67,9 +67,9 @@ public class ControlRuleChangeActivator {
|
||||
String persistTpsRule = ruleStorageProxy.getExternalStorage().getTpsRule(pointName);
|
||||
ruleStorageProxy.getLocalDiskStorage().saveTpsRule(pointName, persistTpsRule);
|
||||
} else {
|
||||
Loggers.CONTROL
|
||||
.info("No external rule storage found,will load local disk instead,point name={}",
|
||||
event.getPointName());
|
||||
Loggers.CONTROL.info(
|
||||
"No external rule storage found,will load local disk instead,point name={}",
|
||||
event.getPointName());
|
||||
}
|
||||
|
||||
}
|
||||
@ -114,7 +114,7 @@ public class ControlRuleChangeActivator {
|
||||
}
|
||||
String limitRule = ruleStorageProxy.getLocalDiskStorage().getConnectionRule();
|
||||
|
||||
Loggers.CONTROL.info("start to apply connection rule content " + limitRule);
|
||||
Loggers.CONTROL.info("start to apply connection rule content {}", limitRule);
|
||||
ConnectionControlManager controlManager = ControlManagerCenter.getInstance()
|
||||
.getConnectionControlManager();
|
||||
ConnectionControlRule connectionControlRule =
|
||||
|
@ -76,7 +76,7 @@ public class LocalDiskRuleStorage implements RuleStorage {
|
||||
pointFile.createNewFile();
|
||||
}
|
||||
DiskUtils.writeFile(pointFile, ruleContent.getBytes(Constants.ENCODE), false);
|
||||
LOGGER.info("Save connection rule to local,pointName={}, ruleContent ={} ", ruleContent);
|
||||
LOGGER.info("Save connection rule to local, ruleContent ={} ", ruleContent);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,7 +82,7 @@ public abstract class TpsControlManager {
|
||||
TpsControlRule tpsLimitRule = tpsControlRuleParser.parseRule(localRuleContent);
|
||||
this.applyTpsRule(pointName, tpsLimitRule);
|
||||
} else {
|
||||
Loggers.CONTROL.info("No tps control rule of {} found ", pointName, localRuleContent);
|
||||
Loggers.CONTROL.info("No tps control rule of {} found,content ={} ", pointName, localRuleContent);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user