de.otto.edison.logging.LoggingConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of edison-core Show documentation
Show all versions of edison-core Show documentation
Core library for all Edison libraries.
The newest version!
package de.otto.edison.logging;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.Arrays;
@Configuration
@EnableConfigurationProperties(LoggingProperties.class)
public class LoggingConfiguration {
@Bean
@ConditionalOnProperty(prefix = "edison.logging", name = "header.enabled")
public LogHeadersToMDCFilter logHeadersToMDCFilter(final LoggingProperties properties) {
return new LogHeadersToMDCFilter(Arrays.asList(properties.getHeader().getNames().split(",")));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy