Search in sources :

Example 1 with Log4jServletContextListener

use of org.apache.logging.log4j.web.Log4jServletContextListener in project cas by apereo.

the class CasWebAppConfiguration method log4jServletContextListener.

@Bean
public ServletListenerRegistrationBean log4jServletContextListener() {
    final ServletListenerRegistrationBean bean = new ServletListenerRegistrationBean();
    bean.setEnabled(true);
    bean.setName("log4jServletContextListener");
    bean.setListener(new Log4jServletContextListener());
    return bean;
}
Also used : Log4jServletContextListener(org.apache.logging.log4j.web.Log4jServletContextListener) ServletListenerRegistrationBean(org.springframework.boot.web.servlet.ServletListenerRegistrationBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ServletListenerRegistrationBean(org.springframework.boot.web.servlet.ServletListenerRegistrationBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

Log4jServletContextListener (org.apache.logging.log4j.web.Log4jServletContextListener)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 ServletListenerRegistrationBean (org.springframework.boot.web.servlet.ServletListenerRegistrationBean)1 Bean (org.springframework.context.annotation.Bean)1