-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FileTarget: Fix compress archive file not working when using concurrentWrites="True" and keepFileOpen="True" #1183
Conversation
…ntWrites="True" and keepFileOpen="True"
I couldn't find a way to unit-test this as the log file needs to be locked by an external process :(. |
Current coverage is
|
if (ConcurrentWrites && KeepFileOpen) | ||
{ | ||
// Moving the file will cause all other FileTarget's to release the file, unlocking it for deleting. | ||
string tempFileName = Path.GetTempFileName(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a hack?
…ntWrites="True" and keepFileOpen="True" Instead of moving log file before deleting, rather ensure deleted log file will get released by external process and wait for file delete.
It turns out the other |
Nice that you could reproduce it with an unit test :) |
Thank! It has been merged :) |
FileTarget: Fix compress archive file not working when using concurrentWrites="True" and keepFileOpen="True"
Fixes #1028