All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cool.scx.logging.spi.log4j.ScxLog4jLoggerContext Maven / Gradle / Ivy

There is a newer version: 2.7.4
Show newest version
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 messageFactoryClass) {
        return true;
    }

    @Override
    public Object getExternalContext() {
        return null;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy