title: In log4j2, how to configure renameEmptyFiles to be false for the RollingFile appender?
body: <p>I'm using log4j 2 and RollingFile appender:</p>
  
  <pre><code>&lt;RollingFile name="mylog"
  fileName="mylog.log"
  filePattern="mylog.log.%d{yyyy-MM-dd}.log"&gt;
    &lt;PatternLayout&gt;
      &lt;pattern&gt;[%d] [%-5p] [%-8t] %F:%L %m%n&lt;/pattern&gt;
    &lt;/PatternLayout&gt;
    &lt;Policies&gt;
      &lt;TimeBasedTriggeringPolicy interval="1"/&gt;
    &lt;/Policies&gt;
  &lt;/RollingFile&gt;
  </code></pre>
  
  <p>The log files do get renamed daily.  But the <a href="https://logging.apache.org/log4j/2.x/log4j-core/apidocs/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.html" rel="nofollow">Javadoc of <code>FileRenameAction</code> class</a> indicates there is an option <code>renameEmptyFiles</code> which is false by default so if a day's log is empty it deletes it instead of rename it appending the date to the file name.  How to configure it to true since I'd like to have the log file even if it's empty?</p>