title: Can log4j compress a log file after file size pass 2MB
body: <p>What I want is this: Just like Glassfish 3 server log, if the log file pass certain file size(like 2MB), the log file will automatically zip itself, so that the log file will not become too large. I am not sure if this is done via <code>log</code> api or <code>cron</code> api. Is it possible to obtain what I describe above using <code>log4j</code> or is there some type of <code>cron</code> process involve here? Here is my property file for log4j</p>
  
  <pre><code>log4j.rootLogger=DEBUG, LOG , stdout
  log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  log4j.appender.stdout.layout.ConversionPattern=%5p %d{d/MM/yy HH:mm:ss}:%m%n
  # log4j.appender.LOG.Threshold=INFO
  
  log4j.appender.LOG=org.apache.log4j.RollingFileAppender
  log4j.appender.LOG.File=C:\\dev\\harry\\data\\logs\\core.log
  log4j.appender.LOG.layout=org.apache.log4j.PatternLayout
  log4j.appender.LOG.Append=true
  log4j.appender.LOG.layout.ConversionPattern=%5p %d{d/MM/yy HH:mm:ss}:%m%n
  # log4j.appender.LOG.Threshold=INFO
  </code></pre>