Search in sources :

Example 6 with AccessLogValve

use of org.apache.catalina.valves.AccessLogValve in project spring-boot by spring-projects.

the class DefaultServletWebServerFactoryCustomizerTests method tomcatAccessLogBufferingCanBeDisabled.

@Test
public void tomcatAccessLogBufferingCanBeDisabled() {
    TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory();
    Map<String, String> map = new HashMap<>();
    map.put("server.tomcat.accesslog.enabled", "true");
    map.put("server.tomcat.accesslog.buffered", "false");
    bindProperties(map);
    this.customizer.customize(factory);
    assertThat(((AccessLogValve) factory.getEngineValves().iterator().next()).isBuffered()).isFalse();
}
Also used : TomcatServletWebServerFactory(org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory) HashMap(java.util.HashMap) AccessLogValve(org.apache.catalina.valves.AccessLogValve) Test(org.junit.Test)

Aggregations

AccessLogValve (org.apache.catalina.valves.AccessLogValve)6 Test (org.junit.Test)5 TomcatServletWebServerFactory (org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory)5 HashMap (java.util.HashMap)4 File (java.io.File)1 Connector (org.apache.catalina.connector.Connector)1 AprLifecycleListener (org.apache.catalina.core.AprLifecycleListener)1 StandardServer (org.apache.catalina.core.StandardServer)1 Before (org.junit.Before)1 UndertowServletWebServerFactory (org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory)1 AnnotationConfigServletWebServerApplicationContext (org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext)1 ServletWebServerFactory (org.springframework.boot.web.servlet.server.ServletWebServerFactory)1 ApplicationContext (org.springframework.context.ApplicationContext)1 ConfigurableApplicationContext (org.springframework.context.ConfigurableApplicationContext)1