com.ardikars.common.logging.Slf4jLoggerFactory 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 Slf4jLoggerFactory extends LoggerFactory {
private static final LoggerFactory INSTANCE = new Slf4jLoggerFactory();
private static final boolean HAS_SLF4J;
private Slf4jLoggerFactory() {
//
}
public static boolean hasSlf4j() {
return HAS_SLF4J;
}
public static LoggerFactory getInstance() {
return INSTANCE;
}
@Override
public Logger newInstance(String name) {
return new Slf4jLogger(org.slf4j.LoggerFactory.getLogger(name));
}
static {
boolean hasSlf4j;
try {
Class.forName("org.slf4j.LoggerFactory");
hasSlf4j = true;
} catch (ClassNotFoundException e) {
hasSlf4j = false;
}
HAS_SLF4J = hasSlf4j;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy