title: log4j console appender and log file size
body: <p>I am using Jboss 4.0.2 in Solaris to run a webapp.</p>
  
  <p>JBoss is configured to use the factory default log4j.xml file, and this has a ConsoleAppender. I am redirecting stdout of jboss java process to a file.</p>
  
  <p>Something interesting happens when I try to cleanup this file - jboss.out.</p>
  
  <p>This is where I start.</p>
  
  <pre><code>$ ls -alhrt jboss.out
  -rw-r--r--   1 ipunity  ipunity     458M Jan  8 07:22 jboss.out
  </code></pre>
  
  <p>Then I clean up this file. Jboss is still running.</p>
  
  <pre><code>$ &gt;jboss.out
  $ ls -alhrt jboss.out
  -rw-r--r--   1 ipunity  ipunity        0 Jan  8 07:24 jboss.out
  </code></pre>
  
  <p>Now if go click on a link in my webapp, it starts logging, but the whole file kind of reappears again!</p>
  
  <pre><code>$ ls -alhrt jboss.out
  -rw-r--r--   1 ipunity  ipunity     458M Jan  8 07:25 jboss.out
  </code></pre>
  
  <p>Any ideas on whats going on? </p>
  
  <p>Is ConsoleAppender buffering the data? I dont have enough memory to hold 458MB and my disk swap is almost unused. I dont see any temp file this huge either.</p>