How to "overwrite existing log file" ??? I have tried to set attribute property <appendToFile value="false" />
. but still log file is not getting overwrite.
My config file setting is as follow:
<log4net>
<root>
<level value="DEBUG" />
<appender-ref ref="LogFileAppender" />
</root>
<appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender" >
<file value="Content/log.txt" />
<appendToFile value="false" />
<threshold value="ON" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="10" />
<maximumFileSize value="10MB" />
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
<param name="ConversionPattern" value="%-5p%d{yyyy-MM-dd hh:mm:ss} – %m%n" />
</layout>
</appender>
</log4net>
please let me know where i am doing mistake.