*[I am Log4j rollover illiterate, hence apologies in advance if I am saying
something stupid.]*

Why don't we simply rename files and create new ones?
That is, `mv applog.txt applog-2021.txt` and `touch applog.txt`?
I use this in my RotatingFileOutputStream
<https://github.com/vy/rotating-fos> and there are plenty of happy
customers, even on Windows.

On Sat, Dec 18, 2021 at 4:07 PM Gary Gregory <[email protected]> wrote:

> Hi All:
>
> And now for something completely different.
>
> I wonder why we do not do file rollovers like below, and if we should:
> - Create the file with the target rolled over a name like applog-2021.txt
> - Create a symlink for the constant name like applog.txt to point to
> applog-2021.txt
> - When it's rollover time, start writing to the new file
> applog-2022.txt and change the symlink to point to it.
>
> Zero copy.
>
> Thoughts?
>
> Gary
>

Reply via email to