kazu-yamamoto / logger

A fast logging system for Haskell
159 stars 68 forks source link

Log rotation by day (00:00:00 to 23:59:59.999) #170

Closed buecking closed 5 years ago

buecking commented 5 years ago

I would like to add a new log rotation strategy to fast-logger. My idea is that logs can be rotated each day (00:00:00 - 23:59:59.999). Log files would be named YYYYMMDDTHH:MM:SS-filename.log where the prefix YYYYMMDDTHH:MM:SS indicates the time of the first log message. This log rotation strategy would be orthogonal to the current strategy of rotating by number and size.

Additionally it would to be useful to compress logs after they've been rotated. A simple callback function FilePath -> IO () would allow custom post processing i.e. compression, log-shipping, etc.

If I implement this would you consider pulling it upstream?

kazu-yamamoto commented 5 years ago

Closing this thanks to #171.