Skip to content
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 Windows FileSystem Tunneling when KeepFileOpen=false #5427

Merged
merged 1 commit into from Nov 28, 2023

Conversation

snakefoot
Copy link
Contributor

@snakefoot snakefoot commented Nov 28, 2023

Resolving #5426

Bug introduced with #5381 + #5382 + #5384

NLog v5.2.6 tried to make FileTarget more stable by not momentarily releasing-file-handle when starting new log-file. By updating file-timestamp on the newly opened file. But when using FileTarget KeepFileOpen=false, then file-handle is opened with exclusive write-access, and caused File.SetCreationTimeUtc to fail and not set correct file-creation-timestamp. This meant NLog file-archive-logic would fail together with KeepFileOpen=false.

@snakefoot snakefoot added bug Bug report / Bug fix file-target file-archiving Issues with archiving with the file target labels Nov 28, 2023
Copy link

sonarcloud bot commented Nov 28, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

86.7% 86.7% Coverage
0.0% 0.0% Duplication

@snakefoot snakefoot merged commit b84e892 into NLog:dev Nov 28, 2023
5 checks passed
@snakefoot snakefoot added this to the 5.2.7 milestone Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report / Bug fix file-archiving Issues with archiving with the file target file-target size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant