according to the documentation of log4net :

The following example shows how to configure the RollingFileAppender to
write to the file log.txt. The file written to will always be called log.txt
because the StaticLogFileName param is specified. The file will be rolled
based on a size constraint (RollingStyle). Up to 10 (MaxSizeRollBackups) old
files of 100 KB each (MaximumFileSize) will be kept. These rolled files will
be named: log.txt.1, log.txt.2, log.txt.3, etc... 

However, I copied it into my .config file and run my applicaiton. When the
log file exceeds 100kb, I didn't see the backup files created. Why it is so
and what did I miss out? 

Pleaese help and urgent. Thanks and I will grade your answer.

<appender name="LogFileAppender"
type="log4net.Appender.RollingFileAppender">

<file value="c:\\myApp.log" />

<appendToFile value="true" />

<rollingStyle value="Size" />

<maxSizeRollBackups value="10" />

<maximumFileSize value="100KB" />

<staticLogFileName value="true" />

<layout type="log4net.Layout.PatternLayout">

<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}]
- %message%newline" />

</layout>

</appender>

-- 
View this message in context: 
http://www.nabble.com/why-there-is-no-backup-file--tf2330486.html#a6483216
Sent from the Log4net - Dev mailing list archive at Nabble.com.

Reply via email to