<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=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@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:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal;
font-family:"Calibri","sans-serif";
color:windowtext;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</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=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal>Hello,<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>I have a problem with TimeBasedRollingPolicy and that is
older files are not deleted when I set the MaxHistory property<span
style='color:#1F497D'> for example to ‘2’ but files roll over normally every
day </span> ,<span style='color:#1F497D'> </span>so any suggestions.<o:p></o:p></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>So my question is why files
older that 2 days from the current date are not deleted.<o:p></o:p></span></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Here is my XML file:<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:teal'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F7F7F;background:silver;mso-highlight:silver'>configuration</span><span
style='font-size:10.0pt;font-family:"Courier New";color:teal'>></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:teal'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F7F7F'>appender</span><span style='font-size:
10.0pt;font-family:"Courier New"'> <span style='color:#7F007F'>name</span><span
style='color:black'>=</span><i><span style='color:#2A00FF'>"FILE"</span></i>
<span style='color:#7F007F'>class</span><span style='color:black'>=</span><i><span
style='color:#2A00FF'>"ch.qos.logback.core.rolling.RollingFileAppender"</span></i><span
style='color:teal'>></span><span style='color:black'> </span><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:teal'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F7F7F'>rollingPolicy</span><span
style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#7F007F'>class</span><span
style='color:black'>=</span><i><span style='color:#2A00FF'>"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"</span></i><span
style='color:teal'>></span><span style='color:black'>
</span><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:teal'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F7F7F'>FileNamePattern</span><span
style='font-size:10.0pt;font-family:"Courier New";color:teal'>></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>RollTimeTest.%d.log</span><span
style='font-size:10.0pt;font-family:"Courier New";color:teal'></</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#3F7F7F'>FileNamePattern</span><span
style='font-size:10.0pt;font-family:"Courier New";color:teal'>></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>
</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F5FBF'><!-- keep #days worth of history
--></span><span style='font-size:10.0pt;font-family:"Courier New";
color:black'> </span><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:teal'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F7F7F'>MaxHistory</span><span
style='font-size:10.0pt;font-family:"Courier New";color:teal'>></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>2</span><span
style='font-size:10.0pt;font-family:"Courier New";color:teal'></</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#3F7F7F'>MaxHistory</span><span
style='font-size:10.0pt;font-family:"Courier New";color:teal'>></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>
</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:teal'></</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F7F7F'>rollingPolicy</span><span
style='font-size:10.0pt;font-family:"Courier New";color:teal'>></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'>
</span><span style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:teal'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F7F7F'>layout</span><span style='font-size:
10.0pt;font-family:"Courier New"'> <span style='color:#7F007F'>class</span><span
style='color:black'>=</span><i><span style='color:#2A00FF'>"ch.qos.logback.classic.PatternLayout"</span></i><span
style='color:teal'>></span><span style='color:black'>
</span><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:teal'><</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F7F7F'>Pattern</span><span style='font-size:
10.0pt;font-family:"Courier New";color:teal'>></span><span style='font-size:
10.0pt;font-family:"Courier New";color:black'>%d{HH:mm:ss.SSS}[%thread]
%-5level %logger{35} - %<u>msg</u>%n</span><span style='font-size:10.0pt;
font-family:"Courier New";color:teal'></</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F7F7F'>Pattern</span><span style='font-size:
10.0pt;font-family:"Courier New";color:teal'>></span><span style='font-size:
10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:teal'></</span><span style='font-size:10.0pt;
font-family:"Courier New";color:#3F7F7F'>layout</span><span style='font-size:
10.0pt;font-family:"Courier New";color:teal'>></span><span style='font-size:
10.0pt;font-family:"Courier New";color:black'> </span><span style='font-size:
10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span><span style='font-size:
10.0pt;font-family:"Courier New";color:teal'></</span><span
style='font-size:10.0pt;font-family:"Courier New";color:#3F7F7F'>appender</span><span
style='font-size:10.0pt;font-family:"Courier New";color:teal'>></span><span
style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><span
style='font-size:10.0pt;font-family:"Courier New"'><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span><span style='font-size:
10.0pt;font-family:"Courier New";color:teal'><</span><span style='font-size:
10.0pt;font-family:"Courier New";color:#3F7F7F'>root</span><span
style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#7F007F'>level</span><span
style='color:black'>=</span><i><span style='color:#2A00FF'>"debug"</span></i><span
style='color:teal'>></span><span style='color:black'> </span><o:p></o:p></span></p>
<p class=MsoNormal style='text-autospace:none'><span style='font-size:10.0pt;
font-family:"Courier New";color:black'> </span><span style='font-size:
10.0pt;font-family:"Courier New";color:teal'><</span><span style='font-size:
10.0pt;font-family:"Courier New";color:#3F7F7F'>appender-ref</span><span
style='font-size:10.0pt;font-family:"Courier New"'> <span style='color:#7F007F'>ref</span><span
style='color:black'>=</span><i><span style='color:#2A00FF'>"FILE"</span></i>
<span style='color:teal'>/></span><span style='color:black'> </span><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:black'> </span><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'></</span><span style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F7F'>root</span><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'>><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'></</span><span style='font-size:10.0pt;font-family:"Courier New";
color:#3F7F7F;background:silver;mso-highlight:silver'>configuration</span><span
style='font-size:10.0pt;font-family:"Courier New";color:teal'>><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'>Regards,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New";
color:teal'>Ayman Hammoudeh</span><o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>