title: Log4j same log file multiple webapp versions
body: <p>I have one webapp that i deploy to a tomcat server twice (it has different versions, lets say 1.0 and 2.0). This webapp has a log4j configured. The jar files for log4j are located in the WEB-INF/lib folder of the webapp, while the properties file for the logger is read from an external configuration path.
  I would like that both webapps to log information in the same .log file , but what is actually happening is only ONE (either 1.0 or 2.0) is logging into the specified file, while the other one logs nothing.
  I kinda believe it's because how the log4j is initialized during webapp initialization, but I'm not really sure how to make both 1.0 and 2.0 log into the same file. Any ideas?
  This is my properties file:</p>
  
  <pre><code>log4j.rootLogger=DEBUG, FILE
  
  log4j.additivity.ApplicationLog=false
  
  log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
  log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
  log4j.appender.CONSOLE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %x [%p] [%C{1}.%M] %m%n
  
  log4j.appender.FILE=org.apache.log4j.RollingFileAppender
  log4j.appender.FILE.File=/external/path/myLogFile.log
  log4j.appender.FILE.MaxFileSize=50000KB
  log4j.appender.FILE.MaxBackupIndex=10
  log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
  log4j.appender.FILE.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %x [%p] [%C{1}.%M] %m%n
  </code></pre>
  
  <p>LE: Using tomcat 7</p>
  
  <p>LE2: Might be because of the rollingFileAppender. The second app seems to continue to write in the .log.1 file while the first one writes in the new .log file</p>