<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word"><head><META content="text/html; charset=us-ascii" http-equiv="Content-Type">
<META content="text/html; charset=us-ascii" HTTP-EQUIV="Content-Type"><meta content="Microsoft Word 12 (filtered medium)" name=Generator><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;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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>
<DIV><SPAN STYLE="FONT-SIZE: 7.5pt; COLOR: gray; mso-bidi-font-family: Arial"><FONT COLOR="gray" FACE="Arial" SIZE="1"><SPAN STYLE="FONT-SIZE: 14pt; FONT-FAMILY: 'Arial','sans-serif'"><FONT SIZE="2"><FONT COLOR="#000000" FACE="Times New Roman" SIZE="3"><FONT FACE="Arial" SIZE="1"><FONT SIZE="2"><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Neha,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The maxHistory denotes the number of history files that are maintained. So if you want a cap of the index to be say 10, configure the maxHistory to 10 like shown below, which results in the max index of the history files will be 10.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>In your case it will be test.log.2011-04-06.10<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Kalyan<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> logback-user-bounces@qos.ch [mailto:logback-user-bounces@qos.ch] <b>On Behalf Of </b>Neha Kothari<br><b>Sent:</b> Wednesday, April 06, 2011 9:27 AM<br><b>To:</b> logback users list<br><b>Subject:</b> Re: [logback-user] Logback configuration<o:p></o:p></span></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>The max history is for setting the limit on the file size. I want to set a cap on the index i appended.<br></span><br><br><o:p></o:p></p><table border=0 cellpadding=0 class=MsoNormalTable style='width:100.0%' width="100%"><tr><td style='width:40.0%;padding:.75pt .75pt .75pt .75pt' valign=top width="40%"><p class=MsoNormal><b><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Clemens Siebler &lt;clemens.siebler@googlemail.com&gt;</span></b><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'> </span><br><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Sent by: logback-user-bounces@qos.ch</span> <o:p></o:p></p><p><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>04/06/2011 05:08 AM</span> <o:p></o:p></p><table border=1 cellpadding=0 class=MsoNormalTable><tr><td style='background:white;padding:.75pt .75pt .75pt .75pt' valign=top><p align=center class=MsoNormal style='text-align:center'><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Please respond to<br>logback users list &lt;logback-user@qos.ch&gt;</span><o:p></o:p></p></td></tr></table></td><td style='width:59.0%;padding:.75pt .75pt .75pt .75pt' valign=top width="59%"><table border=0 cellpadding=0 class=MsoNormalTable style='width:100.0%' width="100%"><tr><td style='padding:.75pt .75pt .75pt .75pt' valign=top><p align=right class=MsoNormal style='text-align:right'><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>To</span><o:p></o:p></p></td><td style='padding:.75pt .75pt .75pt .75pt' valign=top><p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>logback users list &lt;logback-user@qos.ch&gt;</span> <o:p></o:p></p></td></tr><tr><td style='padding:.75pt .75pt .75pt .75pt' valign=top><p align=right class=MsoNormal style='text-align:right'><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>cc</span><o:p></o:p></p></td><td style='padding:.75pt .75pt .75pt .75pt' valign=top></td></tr><tr><td style='padding:.75pt .75pt .75pt .75pt' valign=top><p align=right class=MsoNormal style='text-align:right'><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Subject</span><o:p></o:p></p></td><td style='padding:.75pt .75pt .75pt .75pt' valign=top><p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'>Re: [logback-user] Logback configuration</span><o:p></o:p></p></td></tr></table><p class=MsoNormal><o:p>&nbsp;</o:p></p><table border=0 cellpadding=0 class=MsoNormalTable><tr><td style='padding:.75pt .75pt .75pt .75pt' valign=top></td><td style='padding:.75pt .75pt .75pt .75pt' valign=top></td></tr></table></td></tr></table><p class=MsoNormal><br><br><br>Should be possible using the maxHistory parameter:<br><br>&nbsp;&nbsp;&nbsp; &lt;appender name=&quot;file&quot; class=&quot;ch.qos.logback.core.rolling.RollingFileAppender&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;File&gt;test.log&lt;/File&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;encoder&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;pattern&gt;... &lt;/pattern&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/encoder&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;rollingPolicy class=&quot;ch.qos.logback.core.rolling.TimeBasedRollingPolicy&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;fileNamePattern&gt;test.log.%d{yyyy-MM-dd}.%i&lt;/fileNamePattern&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;maxHistory&gt;10&lt;/maxHistory&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;timeBasedFileNamingAndTriggeringPolicy class=&quot;ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;maxFileSize&gt;10MB&lt;/maxFileSize&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/timeBasedFileNamingAndTriggeringPolicy&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/rollingPolicy&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/appender&gt;<br><br>On Tue, Apr 5, 2011 at 10:22 PM, Neha Kothari &lt;<a href="mailto:neha.kothari@db.com">neha.kothari@db.com</a>&gt; wrote: <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><br>Hi have started to use logback for logging in java. I am using &quot;TimeBasedRollingPolicy&quot; rolling policy as I wanted dated logs.</span> <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><br>My file pattern looks like c:/spg-live.%d{yyyy-MM-dd}.%i.log</span> <span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><br>Is there a way that I can put a maxIndex (i.e the maximum limit for i) using the same rolling policy?</span> <br><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><br>Thanks</span> <span style='font-size:10.0pt;font-family:"Arial","sans-serif"'><br></span><br><span style='font-size:7.5pt;font-family:"Arial","sans-serif"'><br>---</span><span style='font-size:10.0pt;font-family:"Courier New"'><br>This communication may contain confidential and/or privileged information.<br>If you are not the intended recipient (or have received this communication<br>in error) please notify the sender immediately and destroy this<br>communication. Any unauthorized copying, disclosure or distribution of the<br>material in this communication is strictly forbidden.<br><br>Deutsche Bank does not render legal or tax advice, and the information<br>contained in this communication should not be regarded as such.</span><br>_______________________________________________<br>Logback-user mailing list<u><span style='color:blue'><br></span></u><a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><u><span style='color:blue'><br></span></u><a href="http://qos.ch/mailman/listinfo/logback-user" target="_blank">http://qos.ch/mailman/listinfo/logback-user</a><br><br><tt><span style='font-size:10.0pt'>_______________________________________________</span></tt><span style='font-size:10.0pt;font-family:"Courier New"'><br><tt>Logback-user mailing list</tt><br><tt>Logback-user@qos.ch</tt><br><tt>http://qos.ch/mailman/listinfo/logback-user</tt><br></span><br><br><span style='font-size:8.0pt;font-family:"Arial","sans-serif";color:black'>---</span><br><span style='font-size:10.0pt;font-family:"Courier New";color:black'>This communication may contain confidential and/or privileged information.<br>If you are not the intended recipient (or have received this communication<br>in error) please notify the sender immediately and destroy this<br>communication. Any unauthorized copying, disclosure or distribution of the<br>material in this communication is strictly forbidden.<br><br>Deutsche Bank does not render legal or tax advice, and the information<br>contained in this communication should not be regarded as such.</span><o:p></o:p></p></div></FONT></FONT></FONT></FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN STYLE="FONT-SIZE: 7.5pt; COLOR: gray; mso-bidi-font-family: Arial"><FONT COLOR="gray" FACE="Arial" SIZE="1"><SPAN STYLE="FONT-SIZE: 14pt; FONT-FAMILY: 'Arial','sans-serif'"><FONT SIZE="2"><FONT COLOR="#000000" FACE="Times New Roman" SIZE="3"><FONT FACE="Arial" SIZE="1">
<HR>
</FONT></FONT></FONT></SPAN></FONT></SPAN></DIV>
<DIV><SPAN STYLE="FONT-SIZE: 7.5pt; COLOR: gray; mso-bidi-font-family: Arial"><FONT FACE="Arial"><SPAN STYLE="FONT-SIZE: 14pt; FONT-FAMILY: 'Arial','sans-serif'"><FONT FACE="Times New Roman"><FONT FACE="Arial"><FONT COLOR="#808080" SIZE="1">NOTICE: <SPAN STYLE="FONT-SIZE: 7.5pt; COLOR: gray; mso-bidi-font-family: Arial"><FONT FACE="Arial"><SPAN STYLE="FONT-SIZE: 14pt; FONT-FAMILY: 'Arial','sans-serif'"><FONT FACE="Times New Roman"><FONT FACE="Arial"><FONT SIZE="1"><FONT COLOR="#808080"><SPAN LANG="EN-GB" STYLE="FONT-SIZE: 9pt; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: SimSun; mso-fareast-theme-font: minor-fareast; mso-ansi-language: EN-GB; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA"><FONT SIZE="1">Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. </FONT></SPAN></FONT></FONT></FONT></FONT></SPAN></FONT></SPAN>If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: </FONT><A HREF="http://www.morganstanley.com/disclaimers"><FONT COLOR="#808080" SIZE="1">http://www.morganstanley.com/disclaimers</FONT></A><FONT COLOR="#808080" SIZE="1">. If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing.</FONT></FONT></FONT></SPAN></FONT></SPAN></DIV><FONT SIZE="+0"></FONT><FONT SIZE="+0"></FONT><FONT SIZE="+0"></FONT><SPAN></SPAN><FONT SIZE="+0"></FONT><SPAN></SPAN></BODY></HTML>