use of com.hazelcast.jet.impl.util.JetConsoleLogHandler in project hazelcast by hazelcast.
the class HazelcastBootstrap method configureLogging.
public static void configureLogging() {
if (LOGGING_CONFIGURED.compareAndSet(false, true)) {
try {
String loggingType = System.getProperty(LOGGING_TYPE.getName(), "jdk");
if (loggingType.equals("jdk")) {
java.util.logging.Logger rootLogger = LogManager.getLogManager().getLogger("");
for (Handler handler : rootLogger.getHandlers()) {
if (handler instanceof ConsoleHandler) {
rootLogger.removeHandler(handler);
rootLogger.addHandler(new JetConsoleLogHandler());
rootLogger.setLevel(Level.INFO);
return;
}
}
}
} catch (Exception e) {
System.err.println("Error configuring java.util.logging for Hazelcast: " + e);
}
}
}
Aggregations