Repository: winsw/winsw

Issue #182: Log roll-by-time should have a limit of files option
Created: 2017-01-12T13:23:03Z
Hi guys, I think it would be helpful to limit the number of log files for roll-by-time too.
is it possible now?

Duplicate issue #348: rotate by time,  log won't remove old logs
Created: 2019-11-21T14:25:46Z
Rotate by time mode
Works like the rotate mode, except that instead of using the size as a threshold, use the time period as the threshold.

This configuration must accompany a nested <pattern> element, which specifies the timestamp pattern used as the log file name.

    <log mode="roll-by-time">
      <pattern>yyyyMMdd</pattern>
    </log>
The syntax of the pattern string is specified by DateTime.ToString(). For example, in the above example, the log of Jan 1, 2013 gets written to myapp.20130101.out.log and myapp.20130101.err.log.

setting roll by time , it can not remove old log auto.
seems it not support       <keepFiles>8</keepFiles>
> ls *.log


    Dir: D:\soft\saml


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       2019/11/21     21:35          64296 winsw.wrapper.log
-a----        2019/11/5      9:24              0 winsw_20191105.err.log
-a----        2019/11/5      9:24          14185 winsw_20191105.out.log
-a----        2019/11/7     23:18              0 winsw_20191107.err.log
-a----        2019/11/7     23:52         718997 winsw_20191107.out.log
-a----        2019/11/8      4:18              0 winsw_20191108.err.log
-a----        2019/11/8     22:27        1028733 winsw_20191108.out.log
-a----        2019/11/9      8:17              0 winsw_20191109.err.log
-a----        2019/11/9     21:13        1156641 winsw_20191109.out.log
-a----       2019/11/10      5:40              0 winsw_20191110.err.log
-a----       2019/11/10     23:53        1261334 winsw_20191110.out.log
-a----       2019/11/11     21:59              0 winsw_20191111.err.log
-a----       2019/11/11     22:52         175079 winsw_20191111.out.log
-a----       2019/11/12     22:08              0 winsw_20191112.err.log
-a----       2019/11/12     22:48         142602 winsw_20191112.out.log
-a----       2019/11/13     15:19              0 winsw_20191113.err.log
-a----       2019/11/13     22:17         187504 winsw_20191113.out.log
-a----       2019/11/14     20:40              0 winsw_20191114.err.log
-a----       2019/11/14     23:09         898690 winsw_20191114.out.log
-a----       2019/11/15     20:54              0 winsw_20191115.err.log
-a----       2019/11/15     21:59          69008 winsw_20191115.out.log
-a----       2019/11/16      1:31              0 winsw_20191116.err.log
-a----       2019/11/16     21:23         720922 winsw_20191116.out.log
-a----       2019/11/17      8:51              0 winsw_20191117.err.log
-a----       2019/11/18      0:00        1164760 winsw_20191117.out.log
-a----       2019/11/18     21:35              0 winsw_20191118.err.log
-a----       2019/11/18     23:10         933898 winsw_20191118.out.log
-a----       2019/11/19     20:54              0 winsw_20191119.err.log
-a----       2019/11/19     23:12         529236 winsw_20191119.out.log
-a----       2019/11/20     20:23              0 winsw_20191120.err.log
-a----       2019/11/20     22:47         917793 winsw_20191120.out.log
-a----       2019/11/21     21:35              0 winsw_20191121.err.log
-a----       2019/11/21     21:35         566851 winsw_20191121.out.log

Closing comment (2020-04-12T10:36:16Z): Duplicate of #182