-
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 crashes if archive file pattern is the same as the log files #1436
Comments
Slight correction: It's something about the combination of the punctuation in the In the example config above, |
This is indeed a bug. Nlog tries to parse the date from current archived files, but failed. |
Too had no time to look at this. If you could help writing an unit test, that would boost the development! |
Sure, I"ll try. |
Thanks! We use xunit1 and you can send a PR :) |
working in this now |
I think the problem is here that the archive filename is the same as the filename (only change is the sequence number). They are both in the same dir also. I couldn't get the same exception, but I think I have solved the issue. |
Thank you for picking this up. |
Hi! Thanks for reporting this feature/bug/question!
Please keep / fill in the relevant info from this template so that we can help you as best as possible.
Type (choose one):
NLog version: latest master from GitHub
Platform: .Net 4.5
Current NLog config (xml or C#, if relevant)
If the character before the replacement pattern
{#}
is a dash, NLog starts throwing exceptions at the point where the log should roll over.Exception info from InternalLogger:
The text was updated successfully, but these errors were encountered: