FileTarget - Skip FileSystemWatcher unless ConcurrentWrites=true#3322
Merged
304NotModified merged 1 commit intoNLog:devfrom Apr 26, 2019
Merged
Conversation
324d486 to
cb4ce6f
Compare
Codecov Report
@@ 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 |
cb4ce6f to
4101987
Compare
572a4b4 to
bc53fbe
Compare
…temWatcher for non-Windows
bc53fbe to
7cf31b1
Compare
Member
|
Is this one safe for 4.6.3? Or should it be 4.7/5.0? |
Contributor
Author
|
I think it is safe for NLog 4.6.3
|
Member
|
also merged, thanks again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=falseorConcurrentWrites=trueorEnableFileDelete=false.PR #1878 introduced the use of
FileSystemWatcherto improveKeepFileOpen=true + EnableFileDelete=trueon Windows. But it was a mixed gift for other platforms.