<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi Logback Users,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I would like to discuss with you two questions concerning logback.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have a REST Web Service that uses the appender "ch.qos.logback.core.rolling.RollingFileAppender" with rolingPolicy "ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"<o:p></o:p></p>
<p class="MsoNormal">with this config<o:p></o:p></p>
<p class="MsoNormal"><fileNamePattern>${LOG_FILE}-%d{yyyy-MM-dd}.%i.log.zip</fileNamePattern><o:p></o:p></p>
<p class="MsoNormal"><maxFileSize>50MB</maxFileSize><o:p></o:p></p>
<p class="MsoNormal"><maxHistory>7</maxHistory><o:p></o:p></p>
<p class="MsoNormal"><totalSizeCap>500MB</totalSizeCap><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I want to have all the logs deleted after 7 days. HOWEVER I realized on my System the rolling appender only runs when my Service is used. If my REST Service is not in use, there might be log files that are older than 7 days, which I would
like to avoid.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Question1: Is there any config that deletes logs according to <maxHistory> settings without using my Service?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Question2: My REST Service has one Endpoint that is not logging anything. Lets assume, only this Endpoint is called and lets assume, there are logs older than <maxHistory>.<o:p></o:p></p>
<p class="MsoNormal">In this case, does rolingFileAppender still delete files according to <maxHistory>??<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">THX and best regards<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="DE" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Mit freundlichen Grüßen / Best regards
<br>
<br>
<b>Birgit Heubach<br>
CI/DAD2.11<br>
</b><br>
Tel. </span><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">+49 711 811-13899
</span><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:black"><br>
<br>
</span><o:p></o:p></p>
</div>
</body>
</html>