cool.scx.logging.spi.log4j.ScxLog4jLoggerContext Maven / Gradle / Ivy
package cool.scx.logging.spi.log4j;
import org.apache.logging.log4j.message.MessageFactory;
import org.apache.logging.log4j.spi.ExtendedLogger;
import org.apache.logging.log4j.spi.LoggerContext;
/**
* ScxLog4jLoggerContext
*
* @author scx567888
* @version 0.0.1
*/
public final class ScxLog4jLoggerContext implements LoggerContext {
@Override
public ExtendedLogger getLogger(final String name) {
return new ScxLog4jLogger(name);
}
@Override
public ExtendedLogger getLogger(final String name, final MessageFactory messageFactory) {
return new ScxLog4jLogger(name);
}
@Override
public boolean hasLogger(final String name) {
return true;
}
@Override
public boolean hasLogger(final String name, final MessageFactory messageFactory) {
return true;
}
@Override
public boolean hasLogger(final String name, final Class extends MessageFactory> messageFactoryClass) {
return true;
}
@Override
public Object getExternalContext() {
return null;
}
}