The max history is for setting the limit on the file size. I want to set a
cap on the index i appended.
Clemens Siebler <[email protected]>
Sent by: [email protected]
04/06/2011 05:08 AM
Please respond to
logback users list <[email protected]>
To
logback users list <[email protected]>
cc
Subject
Re: [logback-user] Logback configuration
Should be possible using the maxHistory parameter:
<appender name="file"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>test.log</File>
<encoder>
<pattern>... </pattern>
</encoder>
<rollingPolicy
class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>test.log.%d{yyyy-MM-dd}.%i</fileNamePattern>
<maxHistory>10</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</appender>
On Tue, Apr 5, 2011 at 10:22 PM, Neha Kothari <[email protected]> wrote:
Hi have started to use logback for logging in java. I am using
"TimeBasedRollingPolicy" rolling policy as I wanted dated logs.
My file pattern looks like c:/spg-live.%d{yyyy-MM-dd}.%i.log
Is there a way that I can put a maxIndex (i.e the maximum limit for i)
using the same rolling policy?
Thanks
---
This communication may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this communication
in error) please notify the sender immediately and destroy this
communication. Any unauthorized copying, disclosure or distribution of the
material in this communication is strictly forbidden.
Deutsche Bank does not render legal or tax advice, and the information
contained in this communication should not be regarded as such.
_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user
_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user
---
This communication may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this communication
in error) please notify the sender immediately and destroy this
communication. Any unauthorized copying, disclosure or distribution of the
material in this communication is strictly forbidden.
Deutsche Bank does not render legal or tax advice, and the information
contained in this communication should not be regarded as such._______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user