-
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
File not archiving when reaches to maximum size given in "archiveAboveSize" #2270
Comments
@Vatsi Please give your nlog.config file, or how you configure the FileTarget using code. Even better attach a small example project that reproduces the issue. |
It was hidden in the post :) |
@Vatsi could you test with a more limited feature set?
Thanks in advance! |
Hi... We tried with given changes... After several configurations, we noticed that setting keepfileopen to false does the trick but that will not allow us to concurrentwrites, correct? Also, we noticed that with every configuration, files were increasing in numbers than given max archive files.... Let me know if you need any more information... Thanks for responding to my queries, I very much appreciate it... Let me know if any more information is required from us. Thanks, |
You can still concurrently write to it. :) Thanks, will try to fix this for the next release. |
@Vatsi Maybe the problem is Tried your exact nlog.config with NLog 4.5-RC and it also fails to roll correctly when many processes, but if I remove |
I am having the same issue with archiving by date. My settings are: fileName="${specialFolder:folder=CommonApplicationData}\ConnexionV14\logs\Connexion.txt" archiveNumbering="Date" archiveEvery="Day" archiveDateFormat="yyyyMMdd" maxArchiveFiles="30" keepFileOpen="true" When the date rolls, NLog still logs to Connexion.txt. No archive files are ever created. I believe this problem has been around since 2015. We switch to WCF logging to work around this issue and I just switched it back to shared logfile logging to see if had been resolved. Old Issue: Writing to the same file from multiple processes does not function when concurrentWrites="true" and keepFileOpen="true" #1029 |
@jonreis Could you try with NLog 4.5-rc06, and ensure that If you can create a test-application that reproduces the issue with NLog 4.5-rc06, then it would be very helpful. |
@sean-gilliam Here is the test application, but please don't bother with it. I cannot seem to reproduce it out side of my application. I will have to assume that the issue is on my side and not NLog. Sorry for the false report. |
@jonreis No problem. Have been making lots of changes to NLog 4.5 to prevent issues with locked file handles stopping the archive logic. Where I have used your test application to test. Unit tests have also been added to validates that the archive logic can be trusted in a concurrent process scenario. |
@304NotModified Since the issue can no longer be reproduced with latest NLog, then it should probably be resolved. |
We haven't seen it so I am for closing it. |
Closing for now. Please let me know if the issue is there again. |
In case of a BUG:
What is the current result?
File not archiving when reaches to maximum size given in "archiveAboveSize"
What is the expected result?
It should archive as per given size.
Did you checked the Internal log?
Yes. Nothing there.
Please post full exception details (message, stacktrace, inner exceptions)
Are there any work arrounds? yes/no
None found for now.
Is there a version in which it did worked?
2.1
Can you help us by writing an unit test?
Let us know what kind of unit test required and I can provide.
Current version of NLog is 4.4.3.
Here is the NLog Section for reference.
in case of a FEATURE REQUEST:
The text was updated successfully, but these errors were encountered: