You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2023/03/22 02:55:05 UTC
[shardingsphere] branch master updated: Refactor YamlLoggingRuleConfigurationSwapper #24728 (#24729)
This is an automated email from the ASF dual-hosted git repository.
jianglongtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 5d9b43de7ca Refactor YamlLoggingRuleConfigurationSwapper #24728 (#24729)
5d9b43de7ca is described below
commit 5d9b43de7cac66c141d5f0e9afa9ac76707e1442
Author: Zheng Feng <zh...@gmail.com>
AuthorDate: Wed Mar 22 10:54:55 2023 +0800
Refactor YamlLoggingRuleConfigurationSwapper #24728 (#24729)
---
.../logging/yaml/swapper/YamlLoggingRuleConfigurationSwapper.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/kernel/logging/core/src/main/java/org/apache/shardingsphere/logging/yaml/swapper/YamlLoggingRuleConfigurationSwapper.java b/kernel/logging/core/src/main/java/org/apache/shardingsphere/logging/yaml/swapper/YamlLoggingRuleConfigurationSwapper.java
index 757eec35859..a9354579c75 100644
--- a/kernel/logging/core/src/main/java/org/apache/shardingsphere/logging/yaml/swapper/YamlLoggingRuleConfigurationSwapper.java
+++ b/kernel/logging/core/src/main/java/org/apache/shardingsphere/logging/yaml/swapper/YamlLoggingRuleConfigurationSwapper.java
@@ -43,11 +43,15 @@ public final class YamlLoggingRuleConfigurationSwapper implements YamlRuleConfig
LoggingRuleConfiguration result = new LoggingRuleConfiguration(YamlLoggersConfigurationConverter.convertShardingSphereLogger(yamlConfig.getLoggers()),
YamlAppendersConfigurationConverter.convertShardingSphereAppender(yamlConfig.getAppenders()));
if (null == result.getLoggers()) {
- result = new DefaultLoggingRuleConfigurationBuilder().build();
+ result = getDefaultLoggingRuleConfiguration();
}
return result;
}
+ private LoggingRuleConfiguration getDefaultLoggingRuleConfiguration() {
+ return new DefaultLoggingRuleConfigurationBuilder().build();
+ }
+
@Override
public Class<LoggingRuleConfiguration> getTypeClass() {
return LoggingRuleConfiguration.class;