web.xml 설정
작업
  1. CONTEXT-PARAM 'log4jConfigLocation' 설정
  2. Spring 이 제공하는 ServletContextListener 설정
의존 라이브러리
  1. spring.jar
  2. log4j.jar
예제 코드

 <!-- Log4J 로딩 설정 -->
 <context-param>
  <param-name>log4jConfigLocation</param-name>
  <param-value>/WEB-INF/log4j.properties</param-value>
 </context-param>

 <listener>
  <listener-class>
   org.springframework.web.util.Log4jConfigListener
  </listener-class>
 </listener>