Skip to content

Commit c7f78a5

Browse files
committed
fix comments
1 parent 5ba5634 commit c7f78a5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

fluss-server/src/main/java/org/apache/fluss/server/utils/LogShutdownUtil.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,14 @@
1717

1818
package org.apache.fluss.server.utils;
1919

20+
import org.slf4j.Logger;
21+
import org.slf4j.LoggerFactory;
22+
2023
/** Utility class to shut down log system. */
2124
public class LogShutdownUtil {
2225

26+
private static final Logger LOG = LoggerFactory.getLogger(LogShutdownUtil.class);
27+
2328
public static void shutdownLogIfPossible() {
2429
// To avoid binding to a specific logging implementation, we use reflection here.
2530
try {
@@ -29,10 +34,9 @@ public static void shutdownLogIfPossible() {
2934
Class<?> logManager = Class.forName("org.apache.logging.log4j.LogManager");
3035
logManager.getMethod("shutdown").invoke(null);
3136
} catch (ClassNotFoundException e) {
32-
System.err.println("Class org.apache.logging.log4j.LogManager not found");
37+
LOG.error("Class org.apache.logging.log4j.LogManager not found", e);
3338
} catch (Exception e) {
34-
System.err.println(
35-
"Error to invoke shutdown method of org.apache.logging.log4j.LogManager");
39+
LOG.error("Error to invoke shutdown method of org.apache.logging.log4j.LogManager", e);
3640
}
3741
}
3842
}

0 commit comments

Comments
 (0)