Limit the number of sinks held open in the map
nblumhardt opened this issue · 0 comments
nblumhardt commented
More scenarios would be supported here if "old" sinks could be automatically garbage collected/removed from the map.
For example, to emulate rolling files, but across rolling directories:
WriteTo.Map(
le => le.Timestamp.Date,
(date, lc) => lc.WriteTo.File($"./logs/{date:yyyyMMdd}/log.txt"))
Via: https://stackoverflow.com/questions/44501377/serilog-rollingfile-sinks-create-folder-named-with-date