log4rs icon indicating copy to clipboard operation
log4rs copied to clipboard

can add trigger kind "time" in rolling_file

Open chw741852 opened this issue 3 years ago • 7 comments

like generate a new log file every minute

chw741852 avatar Sep 03 '21 09:09 chw741852

or every hour or every day, i support for this feature request

orbli avatar Sep 15 '21 02:09 orbli

Is this possible . I would be happy to work and contribute to this .

hvina avatar Sep 16 '21 03:09 hvina

Is this possible . I would be happy to work and contribute to this .

had a bit dig into the issue, i guess it is most probably make another copy of https://github.com/estk/log4rs/blob/master/src/append/rolling_file/policy/compound/roll/fixed_window.rs and change only the function on determining whether to roll and the roll name. just i dont have time for this at the moment, glad if you can help 😂😂

orbli avatar Sep 16 '21 03:09 orbli

I had a quick look at the file naming. From the initial look we are renaming all the files that are present in the archive . I am sure you would have thought about a better mechanism of modifying only the last file. Any thoughts on that

hvina avatar Sep 16 '21 03:09 hvina

:+1: This would be an AWESOME feature. The renaming of every file in the fixed_window rolling policy is slowing us down every time a new archive is produced.

alwinc avatar Oct 12 '21 12:10 alwinc

@alwinc you may want to look at the background_rotation compile flag. @chw741852 , @orbli , @hvina see https://github.com/estk/log4rs/pull/139 it was just never completed. If any of y'all would like to kick that back off let me know if I can answer any questions.

estk avatar Apr 19 '22 19:04 estk

need kind "time"

lingfan avatar Jun 09 '22 10:06 lingfan

Time trigger added in #296

bconn98 avatar Feb 10 '24 03:02 bconn98