Michel
Michel

Reputation: 23645

Can I force the archiving of Nlog files

I've made a page in my website where the admin can see all the errorfiles. I've set the archiving to 'day', so for every day where an error occured I have a file called error.yyyyMMdd.txt (in a subfolder called archives) and for today I have the file 'error.txt'

What happens is that when I have a few days without errors, the file 'error.txt' is not touched, so the file 'errors.txt' is not from today, but from lets say 5 days ago, and in the archives subfolder, I don't have an error file for the situation five days ago.

Is there a way to 'force' Nlog to perform it's archiving and thereby create the archive file?

Upvotes: 2

Views: 378

Answers (1)

Julian
Julian

Reputation: 36830

This isn't possible (yet).

If this will be added, it will be added as an method on the FileTarget class

Upvotes: 1

Related Questions