mirror of https://github.com/winsw/winsw
Warn about broken auto-archiving settings (#522)
* Warn about broken settings * Apply suggestions from code review Co-Authored-By: Oleg Nenashev <o.v.nenashev@gmail.com> * Apply suggestions from code review Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>pull/524/head
parent
1454e3ca36
commit
5881e8eccd
|
@ -67,8 +67,6 @@ Works in a combination of rotate size mode and rotate time mode, if the log file
|
|||
<sizeThreshold>10240</sizeThreshold>
|
||||
<pattern>yyyyMMdd</pattern>
|
||||
<autoRollAtTime>00:00:00</autoRollAtTime>
|
||||
<zipOlderThanNumDays>5</zipOlderThanNumDays>
|
||||
<zipDateFormat>yyyyMM</zipDateFormat>
|
||||
</log>
|
||||
```
|
||||
|
||||
|
@ -78,6 +76,19 @@ For example, in the above example, the log of Jan 1, 2013 gets written to `myapp
|
|||
The syntax of the autoRollAtTime is specified by [TimeSpan.ToString(String)](https://docs.microsoft.com/dotnet/api/system.timespan.tostring#System_TimeSpan_ToString_System_String_).
|
||||
For example, in the above example, at the start of the day it will roll the file over.
|
||||
|
||||
### Automatic archiving of logs
|
||||
|
||||
:warning: This feature is reported to be broken in recent WinSW versions.
|
||||
It is a potential subject for removal.
|
||||
|
||||
|
||||
```xml
|
||||
<log mode="roll-by-size-time">
|
||||
<zipOlderThanNumDays>5</zipOlderThanNumDays>
|
||||
<zipDateFormat>yyyyMM</zipDateFormat>
|
||||
</log>
|
||||
```
|
||||
|
||||
The `zipOlderThanNumDays` can only be used in conjection with autoRollAtTime, provide the number of days of files to keep.
|
||||
|
||||
```xml
|
||||
|
|
Loading…
Reference in New Issue