Search in sources :

Example 1 with Accesslog

use of org.springframework.boot.autoconfigure.web.ServerProperties.Undertow.Accesslog in project spring-boot by spring-projects.

the class UndertowWebServerFactoryCustomizer method mapAccessLogProperties.

private void mapAccessLogProperties(ConfigurableUndertowWebServerFactory factory) {
    Accesslog properties = this.serverProperties.getUndertow().getAccesslog();
    PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
    map.from(properties::isEnabled).to(factory::setAccessLogEnabled);
    map.from(properties::getDir).to(factory::setAccessLogDirectory);
    map.from(properties::getPattern).to(factory::setAccessLogPattern);
    map.from(properties::getPrefix).to(factory::setAccessLogPrefix);
    map.from(properties::getSuffix).to(factory::setAccessLogSuffix);
    map.from(properties::isRotate).to(factory::setAccessLogRotate);
}
Also used : Accesslog(org.springframework.boot.autoconfigure.web.ServerProperties.Undertow.Accesslog) PropertyMapper(org.springframework.boot.context.properties.PropertyMapper)

Aggregations

Accesslog (org.springframework.boot.autoconfigure.web.ServerProperties.Undertow.Accesslog)1 PropertyMapper (org.springframework.boot.context.properties.PropertyMapper)1