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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -