fern icon indicating copy to clipboard operation
fern copied to clipboard

Any good ways to switch to a new log file after a period of time?

Open phyxdown opened this issue 6 years ago • 3 comments

like after an hour

phyxdown avatar Feb 01 '19 08:02 phyxdown

Not at the moment - see https://github.com/daboross/fern/issues/33. But @tanujitghosh is working on an implementation in #36 so we will in the future! (Sooner or later, probably dependent on how fast I can review things.)

daboross avatar Feb 15 '19 23:02 daboross

It's not part of fern directly, but I have these two crates that may help with it: https://docs.rs/reopen/0.2.2/reopen/ https://docs.rs/log-reroute/0.1.2/log_reroute/

vorner avatar Mar 06 '19 19:03 vorner

Support for @vorner's reopen should be available in #40. @phyxdown This means you should be able to logrotate every hour, if you are OK with an external tool telling your application to log to a new file. Otherwise, #36 seems like an awesome alternative.

itkovian avatar Jun 03 '19 11:06 itkovian