Hi Eric,

You combine the sift appender with a rolling file appender.

As you can see your sift appender is a FileAppender.
Instead, you can use a RollingFileAppender, with a size, backup, etc.
So, it will rotate and purge automatically.

Regards
JB

On 11/14/2017 03:42 PM, [email protected] wrote:
Hi,


We are going to create a MDC log with a sift appender:
*# Sift appender*
*log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender*
*log4j.appender.sift.key=bundle.name*
*log4j.appender.sift.default=tesb*
*log4j.appender.sift.appender=org.apache.log4j.FileAppender*
*log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout*
*log4j.appender.sift.appender.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n*
*log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log*
*log4j.appender.sift.appender.append=true*


I'm concerned about the way we will be handle to keep the size log low.


Indeed if I'm not wrong, it is going to grow up constantly with this kind of appender.


What is the right strategy to keep its size low ?


Thanks for your help.


Eric


--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com
  • MDC log purge equefellec
    • Re: MDC log purge Jean-Baptiste Onofré

Reply via email to