[logback-user] RES: log files are not rolling with logback.xml conf in karaf

Fabiano, Lucas Lucas.Fabiano at br.experian.com
Wed Apr 1 13:11:59 CEST 2015


Hi Srikanth,

Please see my code below. This one is working. I saw on yours some diferences.

       <appender name="MONITOR" class="ch.qos.logback.core.rolling.RollingFileAppender">
             <file>${destination}/${contextName}-monitor.log</file>
             <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
                    <!-- separa o arquivo de log diariamente -->
                    <fileNamePattern>${destination}/${contextName}-monitor-%d{yyyyMMdd}.%i.log.zip</fileNamePattern>
                    <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
                           <!-- ou sempre que o arquivo alcancar 100Mb -->
                           <maxFileSize>100MB</maxFileSize>
                           <maxHistory>10</maxHistory>
                    </timeBasedFileNamingAndTriggeringPolicy>
             </rollingPolicy>
             <encoder>
                    <pattern>%date{yyyyMMdd|HHmmss.SSS}|%10X{tid}|%X{ipAddress}|%X{sessionId}|${contextName}|%msg%n</pattern>
             </encoder>
       </appender>


Regards,

  Lucas Fabiano
  Arquitetura Corporativa
  Tel. 5511 2847-9523
  lucas.fabiano at br.experian.com
  serasaexperian.com.br

De: Logback-user [mailto:logback-user-bounces at qos.ch] Em nome de Srikanth Hugar
Enviada em: quarta-feira, 1 de abril de 2015 03:14
Para: logback users list
Assunto: [logback-user] log files are not rolling with logback.xml conf in karaf

Hello All,

      My log files are not rolling when it reached 10MB with below configuration.
I tried other combination too, could not succeed. Please help me in resolving the issue.
What i could be configuring wrong here.

 <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>data/log/karaf.log</file>
        <encoder>
            <pattern>%d{ISO8601} | %-5level | %thread | %logger{1} | %message%n
                                   </pattern>
        </encoder>
        <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
            <maxIndex>15</maxIndex>
            <fileNamePattern>data/log/karaf.%d{yyyy-MM-dd}.%i.gz
                                   </fileNamePattern>
        </rollingPolicy>
        <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
            <MaxFileSize>10MB</MaxFileSize>
        </triggeringPolicy>
    </appender>

Thanks.
Srikanth.

________________________________

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.

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20150401/b0fe5f9a/attachment-0001.html>


More information about the Logback-user mailing list