Type: Bug
NLog version: 4.3.4
Platform: .Net 4.5
I have configured a file target:
<target name="myFileTarget" xsi:type="File" fileName="${event-properties:item=myFileDir}\${event-properties:item=myFile}" layout="${message}" cleanupFileName="false" autoFlush="false" concurrentWrites="false" keepFileOpen="true"> </target>
When I run my application the file gets created and logged into like expected. When my application is idle (no logs are created) and I delete the logfile and then the application starts to produce logs again, the file is not re-created, the logs go to nowhere and no exception or error occures.
I expect that the file is recreated when it does no longer exist. If I set keepFileOpen = "false" this is the case.
Type: Bug
NLog version: 4.3.4
Platform: .Net 4.5
I have configured a file target:
<target name="myFileTarget" xsi:type="File" fileName="${event-properties:item=myFileDir}\${event-properties:item=myFile}" layout="${message}" cleanupFileName="false" autoFlush="false" concurrentWrites="false" keepFileOpen="true"> </target>When I run my application the file gets created and logged into like expected. When my application is idle (no logs are created) and I delete the logfile and then the application starts to produce logs again, the file is not re-created, the logs go to nowhere and no exception or error occures.
I expect that the file is recreated when it does no longer exist. If I set keepFileOpen = "false" this is the case.