I would like my log files to have the following behaviour:
MyApp_2014-06-24.log (this would be the current log file)
MyApp_1_2014-06-24.log etc.
MyApp_2_2014-06-24.log
MyApp_3_2014-06-24.log
I would like to keep the last 10 files, of the last 2 days, and the files
should be of maximum 15MB size.
Any help would be appreciated:)
Here is what I have so far:
<appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender">
<file value="${APPDATA}\logs\MyApp"/>
<appendToFile value="true"/>
<rollingStyle value="Composite"/>
<datePattern value=".yyyy-MM-dd'.log'"/>
<maxSizeRollBackups value="10"/>
<maximumFileSize value="15MB"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger
[%property{NDC}] - %message%newline"/>
</layout>
</appender>
--
View this message in context:
http://apache-logging.6191.n7.nabble.com/Rolling-File-Appender-with-a-fixed-extention-tp46662.html
Sent from the Log4net - Users mailing list archive at Nabble.com.