title: Messed up Log4J configuration in webapp
body: <p>My webapp running in Tomcat 7 is repeating the same log message 6 more times. For example:</p>
  
  <pre><code>[INFO] 1
  29042 [http-nio-8443-exec-4] INFO com.lni.exchange.healthvault.ParseMeasurement  - 1
  29042 [http-nio-8443-exec-4] INFO com.lni.exchange.healthvault.ParseMeasurement  - 1
  29042 [http-nio-8443-exec-4] INFO com.lni.exchange.healthvault.ParseMeasurement  - 1
  29042 [http-nio-8443-exec-4] INFO com.lni.exchange.healthvault.ParseMeasurement  - 1
  29042 [http-nio-8443-exec-4] INFO com.lni.exchange.healthvault.ParseMeasurement  - 1
  29042 [http-nio-8443-exec-4] INFO com.lni.exchange.healthvault.ParseMeasurement  - 1
  </code></pre>
  
  <p>The expected written output is just the first line ([INFO] 1) but then I get 6 repeats of that message. Does anyone have any idea why the message repeats so many times? Probably messed up my log4j properties which has always been a little confusing to me.</p>
  
  <p>I have an Axis2 1.6.2 deployment using Spring that is receiving data and sending it to HealthVault.</p>
  
  <p>Here is the log4j properties file:</p>
  
  <pre><code># Set root category priority to INFO and its only appender to CONSOLE.
  #log4j.rootCategory=INFO, CONSOLE
  log4j.rootCategory=INFO, CONSOLE, LOGFILE
  
  # Set the enterprise logger priority to FATAL
  log4j.logger.org.apache.axis2.enterprise=FATAL
  log4j.logger.de.hunsicker.jalopy.io=FATAL
  log4j.logger.httpclient.wire.header=FATAL
  log4j.logger.org.apache.commons.httpclient=FATAL
  
  # CONSOLE is set to be a ConsoleAppender using a PatternLayout.
  log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
  log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
  log4j.appender.CONSOLE.layout.ConversionPattern=[%p] %m%n
  
  # LOGFILE is set to be a File appender using a PatternLayout.
  log4j.appender.LOGFILE=org.apache.log4j.FileAppender
  log4j.appender.LOGFILE.File=axis2.log
  log4j.appender.LOGFILE.Append=true
  log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
  log4j.appender.LOGFILE.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
  </code></pre>