I am developing a Java Web Application using JSF, Spring and Hibernate. I need to setup Log4J. I included necessary libraries and created a simple log4j.properties file.
At Tomcat output it outputs
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.
I am not experienced in Java Web Application development. Any help would be appreciated.
Edit: Thank you Ken Chan. Your solution is working and simple.
By default ,
log4j.propertiesshould be placed inside the root of the class path of the web application (i.e inside\WEB-INF\classes\of the WAR`) .In
log4j.properties,you should at least set the appender and the logger level for the root logger , for example: