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

org.zodiac.sdk.log.factory.LoggerSpaceFactory4Log4j2Builder Maven / Gradle / Ivy

The newest version!
package org.zodiac.sdk.log.factory;

import java.net.URL;

import org.zodiac.sdk.log.LogSpace;
import org.zodiac.sdk.toolkit.space.SpaceId;

public class LoggerSpaceFactory4Log4j2Builder extends AbstractLoggerSpaceFactoryBuilder {

    public LoggerSpaceFactory4Log4j2Builder(SpaceId spaceId, LogSpace logSpace) {
        super(spaceId, logSpace);
    }

    @Override
    protected String getLoggingToolName() {
        return "log4j2";
    }

    @Override
    public AbstractLoggerSpaceFactory doBuild(String spaceName, ClassLoader spaceClassloader, URL url) {
        try {
            return new Log4j2LoggerSpaceFactory(getSpaceId(), getProperties(), url,
                getLoggingToolName());
        } catch (Throwable e) {
            throw new IllegalStateException("Log4j2 loggerSpaceFactory build error!", e);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy