[logback-user] RollingFileAppender don't roll at all
David Roussel
nabble at diroussel.xsmail.com
Thu Jul 14 19:21:59 CEST 2011
That's quite an old version you're using. Can't you upgrade?
Did you try stepping through the source?
David
On 12 Jul 2011, at 17:36, Sakho Meissa <meissa.sakho at natixis.com> wrote:
> Hi all,
>
> I’m tearing my hairs off to understand why the RollingFileAppender in my configuration doesn’t behave as expected.
>
> I’m using logBack 0.9.15 version with jboss 5.1 EAP. My configuration file is below with few remarks:
>
>
>
> 1) The fileNamePattern I’ve set (in bold) is supposed to create a new file file each minute.
>
> 2) I’ve set layout instead of an encoder (which is in pattern) because encoder in not supported in this version of logback.
>
>
>
> When I start the server the output seem to be ok with my configuration and a log file named tpm-ws.log is created as expected.
>
> After one day of testing, there is no other file created. All logs are still generated in the same file.
>
>
>
> Can someone explain me what’s wrong in my configuration?
>
> Is the RollingFileAppender supported in the 0.9.15 version.
>
>
>
>
>
> <configuration debug="true" scan="true">
>
> <property name="tpm-log-file" value="C:\\Developpement\\jboss\\jboss-5.1.0.GA\\server\\default\\conf\\confwspatio\\logs\\tpm-ws.log" />
>
>
>
> <appender name="TPM-WS-LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
>
> <file>${tpm-log-file}</file>
>
> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
>
> <!-- un nouveau fichier par jour -->
>
> <fileNamePattern>logFile.%d{yyyy-MM-dd-HHmm}.log</fileNamePattern>
>
>
>
> <!-- garde un historique de 30 jours -->
>
> <maxHistory>30</maxHistory>
>
> </rollingPolicy>
>
> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
>
> <maxFileSize>1MB</maxFileSize>
>
> </triggeringPolicy>
>
>
>
> <layout class="ch.qos.logback.classic.PatternLayout">
>
> <Pattern>%d{dd/MM/yyyy HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
>
> </layout>
>
>
>
> <!--
>
> <encoder>
>
> <pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern>
>
> </encoder>
>
> -->
>
> </appender>
>
> <root level="TRACE">
>
> <appender-ref ref="TPM-WS-LOG" />
>
> </root>
>
> <logger name="org.springframework" level="TRACE">
>
> <appender-ref ref="TPM-WS-LOG" />
>
> </logger>
>
>
>
> </configuration>
>
>
>
> Thanks in advance.
>
>
>
> Meissa SAKHO
> NATIXIS
> Systémes d'information Achats et Logistique / Etudes -Banque Privée
> Tél. : +33 1 58 32 20 88
> : +33 6 01 27 58 46
> www.natixis.com
>
>
> L'integrite de ce message n'etant pas assuree sur internet, Natixis ne peut etre tenu responsable de son contenu. Toute utilisation ou diffusion non autorisee est interdite. Si
> vous n'etes pas destinataire de ce message, merci de le detruire et d'avertir l'expediteur. Ensemble, faisons un geste pour l'environnement : n'imprimons nos mails que si
> necessaire.
>
> The integrity of this message cannot be guaranteed on the Internet. Natixis can not therefore be considered responsible for the contents. Any unauthorized use or dissemination is
> prohibited. If you are not the intended recipient of this message, then please delete it and notify the sender. Let us mind the environment : let's print our mails only when
> necessary
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20110714/e55d4c60/attachment-0001.html>
More information about the Logback-user
mailing list