-
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 - Dynamic archive mode with more strict file-mask for cleanup #2524
FileTarget - Dynamic archive mode with more strict file-mask for cleanup #2524
Conversation
883bf61
to
c253710
Compare
c253710
to
fcc5960
Compare
Codecov Report
@@ Coverage Diff @@
## master #2524 +/- ##
=======================================
- Coverage 82% 82% -<1%
=======================================
Files 323 323
Lines 23375 23423 +48
Branches 2920 2931 +11
=======================================
+ Hits 19060 19093 +33
- Misses 3545 3559 +14
- Partials 770 771 +1 |
Could you elaborate on this?
👍 👍 |
Just look at the change of the unit-test, and you should see the problem this PR is trying to fix. LogFile1 has this filename: The automatic wildcard for LogFile1 will become |
any idea if this could fix the unstable test " NLog.UnitTests.Targets.PlainFileTargetTests.SimpleFileDeleteTest(concurrentWrites: False, keepFileOpen: True, networkWrites: False, forceManaged: True, forceMutexConcurrentWrites: False, optimizeBufferReuse: True) [FAIL]" See https://travis-ci.org/NLog/NLog/builds/329033070 (branch master...) |
It is just a safe-guard to ensure the double-string-iteration doesn't go bananas. You are welcome to think up a unit test. |
Well my "fix" is to skip the keepfileopen-config for this test on MONO, as they seem very on unstable on Travis right now (Seems the FileWatcher is not doing its job very well, just like all config-auto-reload tests are skipped on Travis). |
Avoid too aggressive cleanup when having multiple log-archives in the same folder.
Make the NLog 4.5 archive logic more userfriendly.