I inherited a bunch of code and I noticed that in the tomcat logs it says
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
The faq link mentions that this occurs when the default configuration files log4j.properties and log4j.xml can not be found and the application performs no explicit configuration.
How can I figure out how exactly to fix this. The xml file has the following. So I'm guessing its because there is no log4j.xml and instead there is one for each environment. Assuming that is the problem how do I configure things correctly.
<bean id="log4jInitialization"
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass" value="org.springframework.util.Log4jConfigurer" />
<property name="targetMethod" value="initLogging" />
<property name="arguments">
<list>
<value>classpath:log4j-${environment}.properties</value>
</list>
</property>
</bean>