From dd0bbd6f04c581cb44f6afcae12896eadbee1852 Mon Sep 17 00:00:00 2001 From: 145425491 <1245294786@qq.com> Date: Sun, 6 Oct 2024 17:03:24 +0800 Subject: [PATCH] fix(ct): use different Logger to record log --- .../src/main/java/org/apache/hugegraph/ct/base/EnvUtil.java | 2 +- .../main/java/org/apache/hugegraph/ct/base/HGTestLogger.java | 5 ++++- .../java/org/apache/hugegraph/ct/config/AbstractConfig.java | 2 +- .../java/org/apache/hugegraph/ct/config/ClusterConfig.java | 2 +- .../main/java/org/apache/hugegraph/ct/env/AbstractEnv.java | 2 +- .../main/java/org/apache/hugegraph/ct/env/EnvFactory.java | 2 +- .../org/apache/hugegraph/ct/node/AbstractNodeWrapper.java | 2 +- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/base/EnvUtil.java b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/base/EnvUtil.java index 6cd9814816..cc3318f6dc 100644 --- a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/base/EnvUtil.java +++ b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/base/EnvUtil.java @@ -29,7 +29,7 @@ public class EnvUtil { - private static final Logger LOG = HGTestLogger.LOG; + private static final Logger LOG = HGTestLogger.UtilLOG; private static final Set ports = new HashSet<>(); public static int getAvailablePort() { diff --git a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/base/HGTestLogger.java b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/base/HGTestLogger.java index 4a83785369..8e05614b50 100644 --- a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/base/HGTestLogger.java +++ b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/base/HGTestLogger.java @@ -25,5 +25,8 @@ @Slf4j public class HGTestLogger { - public static Logger LOG = LoggerFactory.getLogger(HGTestLogger.class); + public static Logger UtilLOG = LoggerFactory.getLogger(HGTestLogger.class); + public static Logger EnvLOG = LoggerFactory.getLogger(HGTestLogger.class); + public static Logger ConfigLOG = LoggerFactory.getLogger(HGTestLogger.class); + public static Logger NodeLOG = LoggerFactory.getLogger(HGTestLogger.class); } diff --git a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/config/AbstractConfig.java b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/config/AbstractConfig.java index b765e8aee7..58c33ce4ac 100644 --- a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/config/AbstractConfig.java +++ b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/config/AbstractConfig.java @@ -31,7 +31,7 @@ public abstract class AbstractConfig { - protected static final Logger LOG = HGTestLogger.LOG; + protected static final Logger LOG = HGTestLogger.ConfigLOG; protected String config; protected Map properties = new HashMap<>(); protected String fileName; diff --git a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/config/ClusterConfig.java b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/config/ClusterConfig.java index 9b1b7fd14d..5b408af5f1 100644 --- a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/config/ClusterConfig.java +++ b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/config/ClusterConfig.java @@ -25,7 +25,7 @@ public class ClusterConfig { - protected static final Logger LOG = HGTestLogger.LOG; + protected static final Logger LOG = HGTestLogger.ConfigLOG; protected List pdConfigs; protected List storeConfigs; protected List serverConfigs; diff --git a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/env/AbstractEnv.java b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/env/AbstractEnv.java index eb0fc62a26..ba9a53328b 100644 --- a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/env/AbstractEnv.java +++ b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/env/AbstractEnv.java @@ -39,7 +39,7 @@ @Slf4j public abstract class AbstractEnv implements BaseEnv { - private static final Logger LOG = HGTestLogger.LOG; + private static final Logger LOG = HGTestLogger.EnvLOG; protected ClusterConfig clusterConfig; protected List pdNodeWrappers; protected List serverNodeWrappers; diff --git a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/env/EnvFactory.java b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/env/EnvFactory.java index 37507381a0..0881194a34 100644 --- a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/env/EnvFactory.java +++ b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/env/EnvFactory.java @@ -23,7 +23,7 @@ public class EnvFactory { - private static final Logger LOG = HGTestLogger.LOG; + private static final Logger LOG = HGTestLogger.EnvLOG; private static BaseEnv env; public static BaseEnv getEnv() { diff --git a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/node/AbstractNodeWrapper.java b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/node/AbstractNodeWrapper.java index 533d8b2693..e0393216e6 100644 --- a/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/node/AbstractNodeWrapper.java +++ b/hugegraph-cluster-test/hugegraph-clustertest-minicluster/src/main/java/org/apache/hugegraph/ct/node/AbstractNodeWrapper.java @@ -45,7 +45,7 @@ public abstract class AbstractNodeWrapper implements BaseNodeWrapper { - protected final Logger LOG = HGTestLogger.LOG; + protected final Logger LOG = HGTestLogger.NodeLOG; protected int clusterIndex; @Getter protected String workPath;