Search in sources :

Example 1 with StaticLoggerBinder

use of org.slf4j.impl.StaticLoggerBinder in project spring-boot by spring-projects.

the class SpringBootJoranConfiguratorTests method setup.

@Before
public void setup() {
    this.environment = new MockEnvironment();
    this.initializationContext = new LoggingInitializationContext(this.environment);
    this.configurator = new SpringBootJoranConfigurator(this.initializationContext);
    StaticLoggerBinder binder = StaticLoggerBinder.getSingleton();
    this.context = (LoggerContext) binder.getLoggerFactory();
    this.logger = this.context.getLogger(getClass());
}
Also used : LoggingInitializationContext(org.springframework.boot.logging.LoggingInitializationContext) StaticLoggerBinder(org.slf4j.impl.StaticLoggerBinder) MockEnvironment(org.springframework.mock.env.MockEnvironment) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 StaticLoggerBinder (org.slf4j.impl.StaticLoggerBinder)1 LoggingInitializationContext (org.springframework.boot.logging.LoggingInitializationContext)1 MockEnvironment (org.springframework.mock.env.MockEnvironment)1