0

Using Log4net and .Net Core

Is it possible to have always current log file name having a constant name?

I mean if I open a certain file and tail it, it should always show the latest log lines and its not necessary to switch to another file because of roll over rules.

So at the end the logs directory looks like this:

/Logs/MyApp.txt
/Logs/MyApp-20200128-1.txt
/Logs/MyApp-20200128-2.txt
/Logs/MyApp-20200128-3.txt
/Logs/MyApp-20200128-4.txt
/Logs/MyApp-20200127-1.txt
/Logs/MyApp-20200126-1.txt
.
.
.

And MyApp.txt is always remain the current log file. And when it reaches to a certain size it automatically would be archived and new log lines continue on the current log file.

Spongebob Comrade
  • 1,495
  • 2
  • 17
  • 32

0 Answers0