title: Log4j in clustered environment
body: <p>I am using log4j for a web application running in clustered environment. Under few circumstances the logging is lost for some of the processes (not particular). I am not able to pin point why. When run on single server instance, it works fine. I am using a daily rolling file appender.  Any additional attributes to be added/modified ? Will Async Appender help ? Any solution on this ?</p>
  
  <p><strong>EDIT :</strong> Following is log4j XML along with AsyncAppender that I am planning to use</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"&gt;
  
  &lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="true"&gt;
      &lt;appender name="appLog" class="org.apache.log4j.DailyRollingFileAppender"&gt;
          &lt;param name="File" value="/logs/app.log" /&gt;
          &lt;param name="DatePattern" value="'.'yyyy-MM-dd" /&gt;
          &lt;param name="Threshold" value="DEBUG" /&gt;
          &lt;param name="Append" value="true" /&gt;
          &lt;layout class="org.apache.log4j.PatternLayout"&gt;
              &lt;param name="ConversionPattern" value="%d [%t] %-5p (%F:%L) - %m%n" /&gt;
          &lt;/layout&gt;
      &lt;/appender&gt;
  
      &lt;appender name="async" class="org.apache.log4j.AsyncAppender"&gt;
          &lt;param name="BufferSize" value="256" /&gt;
          &lt;param name="LocationInfo" value="true"/&gt; 
          &lt;appender-ref ref="appLog" /&gt;
      &lt;/appender&gt;
  
      &lt;root&gt;
          &lt;priority value="debug" /&gt;
          &lt;appender-ref ref="async" /&gt;
      &lt;/root&gt;
  &lt;/log4j:configuration&gt;
  </code></pre>