Skip to content

Conversation

@snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Apr 20, 2019

Trying to resolve #3321

When running on a non-Windows platform with ConcurrentWrites=false, then just use simple polling of File.Exists() before every file-write (throttled to only be done once every 1 sec).

The polling on non-windows-platform can be disabled by KeepFileOpen=false or ConcurrentWrites=true or EnableFileDelete=false.

PR #1878 introduced the use of FileSystemWatcher to improve KeepFileOpen=true + EnableFileDelete=true on Windows. But it was a mixed gift for other platforms.

@snakefoot snakefoot force-pushed the FileTargetWithoutFileSystemWatcher branch 9 times, most recently from 324d486 to cb4ce6f Compare April 21, 2019 07:34
@codecov-io
Copy link

codecov-io commented Apr 21, 2019

Codecov Report

Merging #3322 into dev will decrease coverage by <1%.
The diff coverage is 38%.

@@          Coverage Diff           @@
##             dev   #3322    +/-   ##
======================================
- Coverage     80%     80%   -<1%     
======================================
  Files        356     356            
  Lines      28100   28141    +41     
  Branches    3743    3749     +6     
======================================
+ Hits       22509   22529    +20     
- Misses      4509    4528    +19     
- Partials    1082    1084     +2

@snakefoot snakefoot force-pushed the FileTargetWithoutFileSystemWatcher branch from cb4ce6f to 4101987 Compare April 21, 2019 07:58
@snakefoot snakefoot force-pushed the FileTargetWithoutFileSystemWatcher branch 2 times, most recently from 572a4b4 to bc53fbe Compare April 21, 2019 21:37
@snakefoot snakefoot force-pushed the FileTargetWithoutFileSystemWatcher branch from bc53fbe to 7cf31b1 Compare April 21, 2019 21:53
@304NotModified
Copy link
Member

Is this one safe for 4.6.3? Or should it be 4.7/5.0?

@304NotModified 304NotModified added enhancement Improvement on existing feature file-target and removed file-target labels Apr 22, 2019
@snakefoot
Copy link
Contributor Author

snakefoot commented Apr 22, 2019 via email

@304NotModified 304NotModified added this to the 4.6.3 milestone Apr 26, 2019
@304NotModified 304NotModified merged commit 21a614c into NLog:dev Apr 26, 2019
@304NotModified
Copy link
Member

also merged, thanks again!

@snakefoot snakefoot deleted the FileTargetWithoutFileSystemWatcher branch April 4, 2020 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement on existing feature file-target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skip FileSystemWatcher unless explicitly requested

3 participants