Answer the question
In order to leave comments, you need to log in
How to understand why log4j is being cut down?
I deploy, so, my application ... Spring is there, on the tomcat ... Everything seems to be going well, and then bam, and ....
03-Apr-2014 23:59:52.083 SEVERE [RMI TCP Connection(5)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Error filterStart
03-Apr-2014 23:59:52.084 SEVERE [RMI TCP Connection(5)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.XmlWebApplicationContext).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
log4j.rootLogger=DEBUG, CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
2014-04-03 23:59:52,067 [RMI TCP Connection(5)-127.0.0.1] DEBUG org.springframework.web.filter.CharacterEncodingFilter - Initializing filter 'encodingFilter'
2014-04-03 23:59:52,080 [RMI TCP Connection(5)-127.0.0.1] DEBUG org.springframework.web.filter.CharacterEncodingFilter - Filter 'encodingFilter' configured successfully
2014-04-03 23:59:52,081 [RMI TCP Connection(5)-127.0.0.1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [servletConfigInitParams] PropertySource with lowest search precedence
2014-04-03 23:59:52,081 [RMI TCP Connection(5)-127.0.0.1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [servletContextInitParams] PropertySource with lowest search precedence
2014-04-03 23:59:52,081 [RMI TCP Connection(5)-127.0.0.1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [jndiProperties] PropertySource with lowest search precedence
2014-04-03 23:59:52,081 [RMI TCP Connection(5)-127.0.0.1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
2014-04-03 23:59:52,082 [RMI TCP Connection(5)-127.0.0.1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
2014-04-03 23:59:52,082 [RMI TCP Connection(5)-127.0.0.1] DEBUG org.springframework.web.context.support.StandardServletEnvironment - Initialized StandardServletEnvironment with PropertySources [servletConfigInitParams,servletContextInitParams,jndiProperties,systemProperties,systemEnvironment]
2014-04-03 23:59:52,082 [RMI TCP Connection(5)-127.0.0.1] DEBUG org.springframework.web.filter.DelegatingFilterProxy - Initializing filter 'springSecurityFilterChain'
Answer the question
In order to leave comments, you need to log in
Log4j even gave you a link to explain the problem: logging.apache.org/log4j/1.2/faq.html#noconfig
Use Log4jConfigListener in your web.xml (or in your web application initialization code if you are not using web.xml):
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/log4j.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question