<br><font size=2 face="sans-serif">Thanks Raman. </font>
<br>
<br><font size=2 face="sans-serif">I read somewhere that maxHistory depends
on the roll-over type. So if I have something like this</font>
<br><font size=3 face="Times New Roman">&lt;fileNamePattern&gt;test.log.%d{yyyy-MM-dd}.%i&lt;/fileNamePattern&gt;<br>
 &lt;maxHistory&gt;10&lt;/maxHistory&gt;</font>
<br><font size=2 face="sans-serif">&lt;timeBasedFileNamingAndTriggeringPolicy
class=&quot;ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP&quot;&gt;</font>
<br><font size=2 face="sans-serif">&lt;maxFileSize&gt;10MB&lt;/maxFileSize&gt;</font>
<br><font size=2 face="sans-serif">&nbsp;&lt;/timeBasedFileNamingAndTriggeringPolicy&gt;</font>
<br>
<br><font size=2 face="sans-serif">which means daily roll-over and maxHistory
signifies that it will keep it for 10 days. So that is where I'm facing
a problem, as putting a number in maxHistory signifies the number of days
it will keep the history for and not the maximum number for files per day.
</font>
<br>
<br><font size=2 face="sans-serif">I also have a case like the following</font>
<br>
<br><font size=3 face="Times New Roman">&lt;rollingPolicy class=&quot;ch.qos.logback.core.rolling.TimeBasedRollingPolicy&quot;&gt;</font>
<br><font size=3 face="Times New Roman">&nbsp; &nbsp; &nbsp; &nbsp; &lt;fileNamePattern&gt;test.log.%d{yyyy-MM}.%i&lt;/fileNamePattern&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;maxHistory&gt;1&lt;/maxHistory&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &lt;timeBasedFileNamingAndTriggeringPolicy
class=&quot;ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP&quot;&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;maxFileSize&gt;10MB&lt;/maxFileSize&gt;</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/timeBasedFileNamingAndTriggeringPolicy&gt;</font>
<br><font size=2 face="sans-serif">&nbsp;&lt;/rollingPolicy&gt;</font>
<br>
<br><font size=2 face="sans-serif">When mentioning the value 1 in maxHistory
I assume it means saving it for a month. So its going to save all test.log.2011-03.0,
test.log.2011-03.1,test.log.2011-03.2,......... Once it reaches may all
files for the month or 03 will be deleted and instead we will have those
for 04. Correct me If I'm not thinking right?</font>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;Raman, Kalyan&quot;
&lt;Kalyan.Raman@morganstanley.com&gt;</b> </font>
<br><font size=1 face="sans-serif">Sent by: logback-user-bounces@qos.ch</font>
<p><font size=1 face="sans-serif">04/06/2011 09:37 AM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
logback users list &lt;logback-user@qos.ch&gt;</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">&quot;logback users list&quot; &lt;logback-user@qos.ch&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [logback-user] Logback configuration</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 color=#1f497d face="Calibri">Hi Neha,</font>
<br><font size=2 color=#1f497d face="Calibri">&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.</font>
<br><font size=2 color=#1f497d face="Calibri">In your case it will be test.log.2011-04-06.10</font>
<br><font size=2 color=#1f497d face="Calibri">&nbsp;</font>
<br><font size=2 color=#1f497d face="Calibri">Thanks,</font>
<br><font size=2 color=#1f497d face="Calibri">Kalyan</font>
<br><font size=2 color=#1f497d face="Calibri">&nbsp;</font>
<br><font size=2 face="Tahoma"><b>From:</b> logback-user-bounces@qos.ch
[mailto:logback-user-bounces@qos.ch] <b>On Behalf Of </b>Neha Kothari<b><br>
Sent:</b> Wednesday, April 06, 2011 9:27 AM<b><br>
To:</b> logback users list<b><br>
Subject:</b> Re: [logback-user] Logback configuration</font>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<br><font size=2 face="Arial"><br>
The max history is for setting the limit on the file size. I want to set
a cap on the index i appended.</font><font size=3 face="Times New Roman"><br>
<br>
</font>
<p>
<table width=100%>
<tr valign=top>
<td width=54%><font size=1 face="Arial"><b>Clemens Siebler &lt;clemens.siebler@googlemail.com&gt;</b>
<br>
Sent by: logback-user-bounces@qos.ch</font><font size=3 face="Times New Roman">
</font>
<p><font size=1 face="Arial">04/06/2011 05:08 AM</font><font size=3 face="Times New Roman">
</font>
<p>
<br>
<table border=4 width=100%>
<tr valign=top>
<td width=100% bgcolor=white>
<div align=center><font size=1 face="Arial">Please respond to<br>
logback users list &lt;logback-user@qos.ch&gt;</font></div></table>
<br>
<td width=45%>
<br>
<table width=100%>
<tr valign=top>
<td width=14%>
<div align=right><font size=1 face="Arial">To</font></div>
<td width=85%><font size=1 face="Arial">logback users list &lt;logback-user@qos.ch&gt;</font><font size=3 face="Times New Roman">
</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="Arial">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="Arial">Subject</font></div>
<td><font size=1 face="Arial">Re: [logback-user] Logback configuration</font></table>
<br><font size=3 face="Times New Roman">&nbsp;</font>
<p>
<br>
<table width=100%>
<tr valign=top>
<td width=50%>
<td width=50%></table>
<br></table>
<br><font size=3 face="Times New Roman"><br>
<br>
<br>
Should be possible using the maxHistory parameter:<br>
<br>
 &nbsp; &nbsp;&lt;appender name=&quot;file&quot; class=&quot;ch.qos.logback.core.rolling.RollingFileAppender&quot;&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;File&gt;test.log&lt;/File&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;encoder&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;pattern&gt;... &lt;/pattern&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;/encoder&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;rollingPolicy class=&quot;ch.qos.logback.core.rolling.TimeBasedRollingPolicy&quot;&gt;<br>
 &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;&lt;maxHistory&gt;10&lt;/maxHistory&gt;<br>
 &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;&lt;maxFileSize&gt;10MB&lt;/maxFileSize&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/timeBasedFileNamingAndTriggeringPolicy&gt;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;&lt;/rollingPolicy&gt;<br>
 &nbsp; &nbsp;&lt;/appender&gt;<br>
<br>
On Tue, Apr 5, 2011 at 10:22 PM, Neha Kothari &lt;</font><a href=mailto:neha.kothari@db.com><font size=3 color=blue face="Times New Roman"><u>neha.kothari@db.com</u></font></a><font size=3 face="Times New Roman">&gt;
wrote: </font><font size=2 face="Arial"><br>
<br>
Hi have started to use logback for logging in java. I am using &quot;TimeBasedRollingPolicy&quot;
rolling policy as I wanted dated logs.</font><font size=3 face="Times New Roman">
</font><font size=2 face="Arial"><br>
<br>
My file pattern looks like c:/spg-live.%d{yyyy-MM-dd}.%i.log</font><font size=3 face="Times New Roman">
</font><font size=2 face="Arial"><br>
Is there a way that I can put a maxIndex (i.e the maximum limit for i)
using the same rolling policy?</font><font size=3 face="Times New Roman">
</font><font size=2 face="Arial"><br>
<br>
Thanks</font><font size=3 face="Times New Roman"> <br>
</font><font size=1 face="Arial"><br>
<br>
---</font><font size=2 face="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.</font><font size=3 face="Times New Roman"><br>
_______________________________________________<br>
Logback-user mailing list</font><font size=3 color=blue face="Times New Roman"><u><br>
</u></font><a href="mailto:Logback-user@qos.ch"><font size=3 color=blue face="Times New Roman"><u>Logback-user@qos.ch</u></font></a><font size=3 color=blue face="Times New Roman"><u><br>
</u></font><a href="http://qos.ch/mailman/listinfo/logback-user" target=_blank><font size=3 color=blue face="Times New Roman"><u>http://qos.ch/mailman/listinfo/logback-user</u></font></a><font size=3 face="Times New Roman"><br>
</font><font size=2 face="Courier New"><br>
_______________________________________________<br>
Logback-user mailing list<br>
Logback-user@qos.ch<br>
http://qos.ch/mailman/listinfo/logback-user</font><font size=3 face="Times New Roman"><br>
<br>
</font><font size=1 face="Arial"><br>
---</font><font size=2 face="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.</font>
<p>
<hr>
<br><font size=1 color=#808080 face="Arial">NOTICE: 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. 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 size=1 color=#808080 face="Arial"><u>http://www.morganstanley.com/disclaimers</u></font></a><font size=1 color=#808080 face="Arial">.
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><tt><font size=2>_______________________________________________<br>
Logback-user mailing list<br>
Logback-user@qos.ch<br>
http://qos.ch/mailman/listinfo/logback-user<br>
</font></tt>
<br>
<br>
<span style="font-family:'Arial',sans-serif; font-size:8pt; color:#000000">---</span><br>
<span style="font-family:'Courier New',monospace; font-size:10pt; color:#000000">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>