[logback-dev] having trouble with logs and rolling over

Jason Roscoe jroscoe at riteaid.com
Fri Apr 9 02:48:58 CEST 2010


Ok, I'll see if we can update.  What other elements should it be complaining about?

Thanks!!
________________________________________
From: logback-dev-bounces at qos.ch [logback-dev-bounces at qos.ch] On Behalf Of Ceki Gülcü [ceki at qos.ch]
Sent: Thursday, April 08, 2010 5:00 PM
To: logback developers list
Subject: Re: [logback-dev] having trouble with logs and rolling over

Hello Jason,

Time *and* size based rolling was introduced in version 0.9.17. By the way,
logback should be complaining about not being able to handle
'timeBasedFileNamingAndTriggeringPolicy' as well as other elements.

BTW, this is the developer's list. Your message is better suited for the user's
list.

HTH,

On 08/04/2010 6:29 PM, Jason Roscoe wrote:
> I have the below configuration where I want to have a log file roll over
> either at midnight or when the log gets to 100MB. We are using logback
> version 0.9.15 at the moment. Using the below, I'm actually not getting
> any logging. Could someone help me with this?
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <configuration>
>
> <appender class="ch.qos.logback.core.rolling.RollingFileAppender"
> name="RootFileAppender">
>
> <file>/apps/projects/liferay/logs/my-subscriptions.log</file>
>
> <append>true</append>
>
> <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
>
> <level>debug</level>
>
> </filter>
>
> <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
>
> <!-- rollover daily -->
>
> <fileNamePattern>/apps/projects/liferay/logs/my-subscriptions.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
>
>
> <timeBasedFileNamingAndTriggeringPolicy
> class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
>
> <!-- or whenever the file size reaches 100MB -->
>
> <maxFileSize>100MB</maxFileSize>
>
> </timeBasedFileNamingAndTriggeringPolicy>
>
> <maxHistory>30</maxHistory>
>
> </rollingPolicy>
>
> <layout class="ch.qos.logback.classic.PatternLayout">
>
> <Pattern>%date %p [%c{0}] - %message%n</Pattern>
>
> </layout>
>
> </appender>
>
> <appender class="ch.qos.logback.core.ConsoleAppender"
> name="RootConsoleAppender">
>
> <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
>
> <level>info</level>
>
> </filter>
>
> <layout class="ch.qos.logback.classic.PatternLayout">
>
> <Pattern>%-4r [%t] %-5p %c %x - %m%n</Pattern>
>
> </layout>
>
> </appender>
>
> <root>
>
> <level value="debug"/>
>
> <appender-ref ref="RootFileAppender"/>
>
> <appender-ref ref="RootConsoleAppender"/>
>
> </root>
>
> </configuration>
>
> Thanks
>


_______________________________________________
logback-dev mailing list
logback-dev at qos.ch
http://qos.ch/mailman/listinfo/logback-dev

Disclaimer: This e-mail message is intended only for the personal use of
the recipient(s) named above.  If you are not an intended recipient, you
may not review, copy or distribute this message. If you have received this
communication in error, please notify us immediately by e-mail and delete
the original message.

This e-mail expresses views only of the sender, which are not to be
attributed to Rite Aid Corporation and may not be copied or distributed
without this statement.


More information about the logback-dev mailing list