com.jpattern.service.log.slf4j.Slf4jLoggerServiceBuilder Maven / Gradle / Ivy
package com.jpattern.service.log.slf4j;
import com.jpattern.service.log.ALoggerServiceBuilder;
import com.jpattern.service.log.ILoggerService;
import com.jpattern.service.log.NullLoggerServiceBuilder;
/**
*
* @author Francesco Cina'
*
* 4 Mar 2011
*/
public class Slf4jLoggerServiceBuilder extends ALoggerServiceBuilder {
private static final long serialVersionUID = 1L;
private final ILoggerBackendConfigurator loggerBackendConfigurator;
private final ALoggerServiceBuilder loggerServiceBuilder;
public Slf4jLoggerServiceBuilder() {
this(new NullLoggerBackendConfigurator());
}
public Slf4jLoggerServiceBuilder(ILoggerBackendConfigurator loggerBackendConfigurator) {
this(new NullLoggerServiceBuilder(), loggerBackendConfigurator);
}
public Slf4jLoggerServiceBuilder(ALoggerServiceBuilder loggerServiceBuilder, ILoggerBackendConfigurator loggerBackendConfigurator) {
this.loggerServiceBuilder = loggerServiceBuilder;
this.loggerBackendConfigurator = loggerBackendConfigurator;
}
@Override
public ILoggerService build() {
loggerBackendConfigurator.configure();
return new Slf4jLoggerService( loggerServiceBuilder.build() );
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy