title: How to delete old logs with log4j2
body: <p>( F.Y.I. I already searched out many documents in Internet. I'm using storm-0.10.0-beta1. Configuration file of log4j2 in Storm is worker.xml )</p>
  
  <p>Now, I try to use log4j2.</p>
  
  <p>I'm searching out way of deleting old logs but I cannot find out.
  Part of configuration is like below.</p>
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;RollingFile name="SERVICE_APPENDER"
               fileName="${sys:storm.home}/logs/${sys:logfile.name}.service"
               filePattern="${sys:storm.home}/logs/${sys:logfile.name}.service.%d{yyyyMMdd}"&gt;
          &lt;PatternLayout&gt;
              &lt;pattern&gt;${pattern}&lt;/pattern&gt;
          &lt;/PatternLayout&gt;
          &lt;Policies&gt;
              &lt;TimeBasedTriggeringPolicy interval="1" modulate="true"/&gt;
          &lt;/Policies&gt;
          &lt;DefaultRolloverStrategy max="9"/&gt;
      &lt;/RollingFile&gt;
  </code></pre>
  
  <p>At first, I expected that log files which are older than 3 days are removed.</p>
  
  <p>But, actually, it doesn't.</p>
  
  <p>So, I wonder whether there is a way to remove old logs or not.</p>
  
  <p>If there is a way which I didn't catch yet, please notify me. </p>