title: Converting log4j.properties file to log4j2.properties file
body: <p>I have a log4j.properties file with 2 custom appenders and 2 custom loggers which I need to convert to log4j2.properties file.
  FileNamePatternRollingFileAppender is an extension of RollingFileAppender.
  Read the documentation and tried to use some conversion tools but it did not work.
  How the log4j2.properties file will look like in this case?</p>
  <pre><code>log4j.logger.ibuild.reports.XML.XMLLogger=DEBUG,StatisticXmlAppender
  log4j.logger.ibuild.reports.CSV.CSVLog=DEBUG,CsvRolledFileAppender
  
  log4j.appender.StatisticXmlAppender=ibuild.reports.FileNamePatternRollingFileAppender
  log4j.appender.StatisticXmlAppender.File=IndexStat
  log4j.appender.StatisticXmlAppender.suffix=.xml
  log4j.appender.StatisticXmlAppender.simpleDateFormatpattern=MM.dd.yy_HH.mm.ss.SSS
  log4j.appender.StatisticXmlAppender.MaxFileSize=100MB
  log4j.appender.StatisticXmlAppender.MaxBackupIndex=10
  log4j.appender.StatisticXmlAppender.layout=org.apache.log4j.PatternLayout
  log4j.appender.StatisticXmlAppender.layout.ConversionPattern=%m%n
  
  log4j.appender.CsvRolledFileAppender=ibuild.reports.FileNamePatternRollingFileAppender
  log4j.appender.CsvRolledFileAppender.File=CallProcInfo
  log4j.appender.CsvRolledFileAppender.suffix=.csv
  log4j.appender.CsvRolledFileAppender.simpleDateFormatpattern=MM.dd.yy_HH.mm.ss.SSS
  log4j.appender.CsvRolledFileAppender.MaxFileSize=100MB
  log4j.appender.CsvRolledFileAppender.MaxBackupIndex=10
  log4j.appender.CsvRolledFileAppender.layout=org.apache.log4j.PatternLayout
  log4j.appender.CsvRolledFileAppender.layout.ConversionPattern=%m%n
  </code></pre>
  <p>Thanks</p>
  <p>EDIT:</p>
  <p>This is the log4j2.xml after using the recommended converter and with using the original class of RollingFileAppender.</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; ?&gt;&lt;Configuration name=&quot;Log4j1&quot;&gt;
  &lt;Appenders&gt;
      &lt;RollingFile 
          name=&quot;StatisticXmlAppender&quot;
          fileName=&quot;IndexStat&quot;
          filePattern=&quot;IndexStat.%i&quot;&gt;
          &lt;PatternLayout pattern=&quot;%m%n&quot;/&gt;
          &lt;Policies&gt;
              &lt;SizeBasedTriggeringPolicy size=&quot;100MB&quot;/&gt;
          &lt;/Policies&gt;
          &lt;DefaultRolloverStrategy max=&quot;10&quot;/&gt;
      &lt;/RollingFile&gt;
      &lt;RollingFile
          name=&quot;CsvRolledFileAppender&quot;
          fileName=&quot;CallProcInfo&quot;
          filePattern=&quot;CallProcInfo.%i&quot;&gt;
          &lt;PatternLayout pattern=&quot;%m%n&quot;/&gt;
          &lt;Policies&gt;
              &lt;SizeBasedTriggeringPolicy size=&quot;100MB&quot;/&gt;
          &lt;/Policies&gt;
          &lt;DefaultRolloverStrategy max=&quot;10&quot;/&gt;
      &lt;/RollingFile&gt;
  &lt;/Appenders&gt;
  &lt;Loggers&gt;
      &lt;Logger
       name=&quot;ibuild.reports.CSV.CSVLog&quot; level=&quot;DEBUG&quot;&gt;
       &lt;AppenderRef ref=&quot;CsvRolledFileAppender&quot;/&gt;
       &lt;/Logger&gt;
       &lt;Logger name=&quot;ibuild.reports.XML.XMLLogger&quot; level=&quot;DEBUG&quot;&gt;
       &lt;AppenderRef ref=&quot;StatisticXmlAppender&quot;/&gt;
       &lt;/Logger&gt;
  &lt;/Loggers&gt;
  </code></pre>