<div dir="ltr">I am also looking for solution. I am exactly in same situation as your.<div><br></div><div>Please let me know if you find a solution. I am also investigating. Will update if i find a solution.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><font face="verdana, sans-serif" size="4">Srikanth Hugar</font></div><font color="#660000" face="verdana, sans-serif" size="4"><a href="http://www.gharki.com" target="_blank">www.gharki.com</a></font><div><div><br></div><div><br></div></div></div></div></div>
<br><div class="gmail_quote">On Fri, Apr 3, 2015 at 7:04 PM, Fabiano, Lucas <span dir="ltr"><<a href="mailto:Lucas.Fabiano@br.experian.com" target="_blank">Lucas.Fabiano@br.experian.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="PT-BR" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">Hi everyone,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I’m using the configuration below for the appender. What I want to do is rollout the file after reach a size or in a daily bases.<u></u><u></u></p>
<p class="MsoNormal">My problem is regarding how many files I want to have. I use the maxHistory and it works well for daily log and remove the old ones.<u></u><u></u></p>
<p class="MsoNormal">The problem is when the file achieve the maximum size for it in the same day. It creates a new file with the index number on the file name but I can’t control how many files I can have.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I tried to use the max and min index it inside timeBasedFileNamingAndTriggeringPolicy tag  but when the config load it shows na error saying the configuration is in the wrong place.<u></u><u></u></p>
<p class="MsoNormal">Even if I put the maxhistory inside this tag it shows the same problem and don’t rollout by size.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">                <appender name="APPLICATION" class="ch.qos.logback.core.rolling.RollingFileAppender"><u></u><u></u></p>
<p class="MsoNormal">                               <file>${destination}/${contextName}.log</file><u></u><u></u></p>
<p class="MsoNormal">                                <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"><u></u><u></u></p>
<p class="MsoNormal">                                               <!-- separa o arquivo de log diariamente --><u></u><u></u></p>
<p class="MsoNormal">                                               <fileNamePattern>${destination}/${contextName}-%d{yyyyMMdd}.%i.log.zip</fileNamePattern><u></u><u></u></p>
<p class="MsoNormal">                                               <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"><u></u><u></u></p>
<p class="MsoNormal">                                                               <!-- ou sempre que o arquivo alcancar 100Mb --><u></u><u></u></p>
<p class="MsoNormal">                                                               <maxFileSize>1MB</maxFileSize><u></u><u></u></p>
<p class="MsoNormal">                                               </timeBasedFileNamingAndTriggeringPolicy><u></u><u></u></p>
<p class="MsoNormal">                                               <maxHistory>2</maxHistory><u></u><u></u></p>
<p class="MsoNormal">                               </rollingPolicy><u></u><u></u></p>
<p class="MsoNormal">                               <encoder><u></u><u></u></p>
<p class="MsoNormal">                                               <pattern>%date{yyyyMMdd|HHmmss.SSS}|%-5level|%10X{tid}|%logger{0}:%line|%msg%n</pattern><u></u><u></u></p>
<p class="MsoNormal">                               </encoder><u></u><u></u></p>
<p class="MsoNormal">                </appender><u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Any advice will be welcome.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thank you!<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Lucas<u></u><u></u></p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
This email and any attachments are for the exclusive and confidential use of the named intended recipient(s) and may be legally privileged. Any review, re-transmission, dissemination or any other use of its contents, or taking of any action in reliance upon
 this information by persons and/or entities other than the named intended recipient(s) is strictly prohibited. If you have received this communication in error, please send this communication back to the sender, disregard its contents, and promptly delete
 the original message and any copy of it from your computer systems. The misuse of this message will be dealt according to company rules and current legislation. This message expresses the sender’s point of view about the topics described and not necessarily
 expresses Serasa Experian’s opinion about them.<br>
<br>
As informações contidas nesta mensagem e no(s) arquivo(s) anexo(s) são endereçadas exclusivamente à(s) pessoa(s) e/ou instituição(ões) acima indicada(s), e podem conter dados confidenciais. É expressamente proibido a pessoas não autorizadas, sob qualquer forma
 ou pretexto, utilizá-las, divulgá-las, alterá-las, de forma impressa ou copiada, total ou parcialmente. Caso tenha recebido esta mensagem erroneamente, por favor, notifique o remetente e providencie imediata exclusão da original e de qualquer cópia. O uso
 impróprio será tratado conforme as normas da empresa e da legislação em vigor. Esta mensagem expressa o posicionamento pessoal do subscritor e não reflete necessariamente a opinião da Serasa Experian.<br>
</font>
</div>

<br>_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div>