iccicci / rotating-file-stream

Opens a stream.Writable to a file rotated by interval and/or size. A logrotate alternative.
MIT License
286 stars 39 forks source link

The first rotated file is not specified time length. #89

Closed rick-yhchen1013 closed 1 year ago

rick-yhchen1013 commented 1 year ago

The rotate seems aligned with system time. Is it possible to rotate the file exactly with specified time inteval?

suppose the inteval is 60s if user start to use the file stream at clock 09:38:24, the first file is saved in clock 09:39:24, the second file is saved in clock 09:40:24. And the file size of each file are roughly the same size if the stream of data is continuous the same amount per period of time.

iccicci commented 1 year ago

Nope @rick-yhchen1013 , that option is not present, sorry.