com.ardikars.common.logging.JdkLoggerFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-logging Show documentation
Show all versions of common-logging Show documentation
Java Common is an project focused on all aspects of reusable Java components.
package com.ardikars.common.logging;
class JdkLoggerFactory extends LoggerFactory {
private static final LoggerFactory INSTANCE = new JdkLoggerFactory();
private static final boolean HAS_JDK_LOGGER;
private JdkLoggerFactory() {
//
}
public static boolean hasJdkLogger() {
return HAS_JDK_LOGGER;
}
public static LoggerFactory getInstance() {
return INSTANCE;
}
@Override
public Logger newInstance(String name) {
return new JdkLogger(java.util.logging.Logger.getLogger(name));
}
static {
boolean hasJdkLogger;
try {
Class.forName("java.util.logging.Logger");
hasJdkLogger = true;
} catch (ClassNotFoundException e) {
hasJdkLogger = false;
}
HAS_JDK_LOGGER = hasJdkLogger;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy