How to stop Log4Net from creating an empty log file -
i have stopped appenders writing logs file adding <log4net threshold="off" />
. want stop log4net creating empty log file. idea how? in advance!
rootappender:
<appender name="rootrollingfileappender" type="log4net.appender.rollingfileappender"> <file value="d:\documents\debug.log" /> <appendtofile value="true" /> <rollingstyle value="size" /> <maxsizerollbackups value="2" /> <maximumfilesize value="10000kb" /> ... </appender>
i managed stop log4net creating empty log file removing <file >
child element of appender, along related properties, , setting <appendtofile value="false" />
. modified configuration follows:
<log4net threshold="off">
...
<appendtofile value="false" /> <rollingstyle value="size" /> <rollingstyle value="composite" /> </appender> <!-- end root appender --> </log4net>
Comments
Post a Comment