-
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
FileArchiveModeFactory - Extracted from FileTarget #1993
FileArchiveModeFactory - Extracted from FileTarget #1993
Conversation
95f2de4
to
a0def89
Compare
It's the limited silverlight api.
There's maybe a helper for this already. |
eb86191
to
cf074c5
Compare
Codecov Report
@@ Coverage Diff @@
## master #1993 +/- ##
=======================================
+ Coverage 81% 82% +<1%
=======================================
Files 291 299 +8
Lines 20124 20305 +181
Branches 2392 2433 +41
=======================================
+ Hits 16356 16593 +237
+ Misses 3152 3107 -45
+ Partials 616 605 -11 |
b0dbb8d
to
45b8254
Compare
@304NotModified Thanks that fixed the appveyor-build. The travis-build required some changes to the unit-tests. But now things are looking green. And I have implemented a fix for my worries about performing too many archive cleanups. |
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.
Cool! I afraid of the merge issues with the CoreCLR branch, but I guess it's only an issue with the FileTarget file.
Please move all the classes to their own file :)
(and maybe own folder)
It the UTC change really needed? I prefer tests with localtime as that would be a better test IMO
45b8254
to
dce13e8
Compare
Have now moved the classes into their own individual file. |
52d3b26
to
cc756f1
Compare
baa107d
to
095f84c
Compare
2330666
to
4a89a1a
Compare
4a89a1a
to
ab10b46
Compare
Attempt to resolve the issues #1670 and #1681, which is mostly caused by not understanding how to configure the NLog Archive Logic (And also major refactoring of the archive logic in FileTarget).
I guess more effort could be applied to FileArchiveModeDynamicSequence.GenerateFileNameMask() to better recognize any date-format-output.
Enabled the unit-tests from #1788, but had to modify them, so they would work with Mono on Linux (Changed hardcoded windows-backslash to Path.Combine). The tests also suffered from confusing debug- and trace-level (Logged to debug-level and didn't expect it to reach trace-level).
!! Breaking change !!
If using ArchiveNumberingMode.Sequence (default) and not having configured an ArchiveFileName (default) and have enabled archiving (MaxArchiveFiles > 0). Then it will now enable dynamic-sequence mode, instead of strict-sequence-mode.
Dynamic-sequence-mode will use the same archive-filename-format (as strict-sequence-mode), but its filemask-wildcard for doing archive-cleanup is a little more greedy as it replaces the largest range of digits (must be more than one) with a wildcard (and not just the sequence-no).
This improves the out-of-box archive-cleanup, when the FileTarget.FileName-Layout includes date-renderer.
New behavior for dynamice sequence-mode
New behavior when ArchiveFileName does not contain sequence-no-pattern
(#}
:This improves the out-of-box archive-cleanup, when the ArchiveFileName-Layout includes date-renderer.
Other changes:
This change is