File target: Handle UnauthorizedAccessException for multi-process mutexes (e.g. Xamarin and UWP)#3079
File target: Handle UnauthorizedAccessException for multi-process mutexes (e.g. Xamarin and UWP)#3079304NotModified merged 3 commits intodevfrom
Conversation
|
@snakefoot your input please :) |
|
So when people configure KeepFileOpen on limited NetCore-platforms then they will continue to have KeepFileOpen=false. Think this is very confusing, and still prefer to have ConcurrentWrites = false by default on NetCore-platforms, instead of all this guess-magic. Still don't like the testing with exceptions. Also you need to catch a lot more. See also
|
I tried to not change the current behavior (the fallback when there is no mutex), but only change the detection, which wasn't good enough. If the fallback is not good, IMO that's another issue and maybe more for NLog 5.
will fix that |
…exes (e.g. Xamarin and UPW) detect creating Mutex also runtime.
a9e4577 to
28768ad
Compare
|
Please make And places where null is not acceptable (Ex. |
that's existing code. Just moved around. |
|
Yes but now you have made the support-detection more advanced, and the fallback was invalid, and now the fallback is exercised even more. |
|
Fair enough, will check that |
|
Btw. Title of PR should be UWP (and not UPW) |
|
WUPS! |
bfd6bac to
43aa9cc
Compare
|
@snakefoot please review, thanks! |
43aa9cc to
edb7191
Compare
exception on creating mutex but not supported
edb7191 to
aaf66b8
Compare
Codecov Report
@@ Coverage Diff @@
## dev #3079 +/- ##
=======================================
+ Coverage 80% 80% +1%
=======================================
Files 349 349
Lines 27519 28685 +1166
Branches 3653 3986 +333
=======================================
+ Hits 21903 22977 +1074
- Misses 4567 4634 +67
- Partials 1049 1074 +25 |
|
@snakefoot thanks for your suggestions. Those are applied now. Please let me know if this is ready to merge :) |
|
Looks good now. Still prefer just having global-mutex disabled by default for NetCore. Better performance and better compatibility. Maybe for NLog 5.0 ? |
I think that's OK, but we have to double check the pro and cons for it |
detect creating Mutex also runtime.
alternative solution for #3048
See #2742 and #2824 and #2925 and #3059
supersedes #3063