logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill McCormick" <wpmccorm...@ace-co.com>
Subject RollingFileAppender datePattern
Date Mon, 06 Oct 2008 21:53:26 GMT
I have a RollingFileAppender defined like so:

  <appender name="XMLRollingFile"
type="log4net.Appender.RollingFileAppender">
    <threshold value="DEBUG" />
    <staticLogFileName value="true" />
    <file value="MyLog.xml" />
    <appendToFile value="true" />
    <rollingStyle value="Date" />
    <datePattern value="yyyyMMdd" />
    <maxSizeRollBackups value="30" />
    <maximumFileSize value="20MB" />
    <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
      <locationInfo value="true" />
    </layout>
  </appender>

Is there a trick to getting the backup files to be named MyLog-yyyyMMdd.xml
as opposed to MyLog.xmlyyyyMMdd?

Having staticLogFileName == false and log files named MyLog-yyyyMMdd.xml
would also be cool!!


Thanks,

Bill

Mime
View raw message