Showing posts with label log4j. Show all posts
Showing posts with label log4j. Show all posts

Wednesday, 4 January 2012

Log4j+Spring warning: No appenders could be found for logger (org.springframework.web.context.ContextLoader)

Warning:
INFO: Initializing Spring root WebApplicationContext
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.
Jan 4, 2012 3:00:45 PM org.apache.catalina.core.ApplicationContext log
Solution: Log4jConfigListener MUST be the 1st listener in web.xml

  log4jConfigLocation
  /WEB-INF/classes/log4j-my.properties



  org.springframework.web.util.Log4jConfigListener


...other listeners here...

Thursday, 3 November 2011

log4j initialization

error: log4j:WARN No appenders could be found for logger (slideselector.facedata.FaceDataParser). log4j:WARN Please initialize the log4j system properly. paramter to vm log4j will look for log4j.properties on the classpath.
java -Dlog4j.configuration= log4j.properties
or enable debug level:
-Dlog4j.debug
References: http://stackoverflow.com/questions/1140358/how-to-initialize-log4j-properly