<font size=2 face="sans-serif">Hi Ceki,</font>
<br>
<br><font size=2 face="sans-serif">thank you for the fast reply. When I
remove the file property, the currently active log file is named according
to the fileNamePattern, but besides that, appearantly nothing changes.
I still have archive files of today with a total size exceeding totalSizeCap.</font>
<br><font size=2 face="sans-serif">Any other ideas? Or do have to implement
a custom rollingPolicy?</font>
<br>
<br><font size=2 face="sans-serif">Simon</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:      
 </font><font size=1 face="sans-serif">Ceki Gulcu <ceki@qos.ch></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:      
 </font><font size=1 face="sans-serif">logback-user@qos.ch</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:      
 </font><font size=1 face="sans-serif">08.04.2016 20:04</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:    
   </font><font size=1 face="sans-serif">Re: [logback-user]
Question about SizeAndTimeBasedRollingPolicy</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:    
   </font><font size=1 face="sans-serif">"logback-user"
<logback-user-bounces@qos.ch></font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2><br>
<br>
Hi Simon,<br>
<br>
I think simply removing the "file" property will go a long way
to a <br>
solution.<br>
<br>
--<br>
Ceki<br>
<br>
<br>
On 4/8/2016 17:03, Simon.Erhardt@befine-solutions.com wrote:<br>
> Hello all,<br>
><br>
> I've got a question about the SizeAndTimeBasedRollingPolicy. What
I<br>
> would like to achieve is a guaranteed upper boundary for the disk
space<br>
> used by log files and archives. I was happy to find the related option<br>
> "totalSizeCap" for SizeAndTimeBasedRollingPolicy which seemed
to help,<br>
> but it turns out that this cap is applied only to files older than
the<br>
> time-based rollover trigger (in my case, a new day). The same seems
to<br>
> be the case for "maxHistory", it doesn't constrain the count
of files<br>
> created on the current day. So it is possible that, in worst case,
a lot<br>
> of files are created and flush disk space.<br>
><br>
> Are there any ideas how to solve that? I read about<br>
> FixedWindowRollingPolicy, but I need day based rollover. Here's my<br>
> non-working approach so far:<br>
><br>
> <appender name="FILE_DEFAULT"<br>
> class="ch.qos.logback.core.rolling.RollingFileAppender"><br>
>          <file>events.log</file><br>
>          <encoder><Pattern>${defaultPattern}</Pattern></encoder><br>
>          <rollingPolicy<br>
> class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"><br>
>        <fileNamePattern>events_%d{yyyy-MM-dd}_%i.zip</fileNamePattern><br>
>        <maxFileSize>1MB</maxFileSize><br>
>        <maxHistory>5</maxHistory><br>
>        <totalSizeCap>10MB</totalSizeCap><br>
>          </rollingPolicy><br>
> </appender><br>
><br>
> I'm looking forward to any responses. Have a nice weekend!<br>
><br>
> Simon Erhardt*<br>
> *Senior Software Architect<br>
> Befine Solutions AG - The Cryptshare company<br>
><br>
><br>
> _______________________________________________<br>
> logback-user mailing list<br>
> logback-user@qos.ch<br>
> </font></tt><a href="http://mailman.qos.ch/mailman/listinfo/logback-user"><tt><font size=2>http://mailman.qos.ch/mailman/listinfo/logback-user</font></tt></a><tt><font size=2><br>
><br>
_______________________________________________<br>
logback-user mailing list<br>
logback-user@qos.ch<br>
</font></tt><a href="http://mailman.qos.ch/mailman/listinfo/logback-user"><tt><font size=2>http://mailman.qos.ch/mailman/listinfo/logback-user</font></tt></a>
<br>
<br>