Rolling appender together with the sift appender in Fuse
Environment
- JBoss Fuse 6.1
Issue
How to configure rolling sift appender for Fuse logger?
Resolution
In order to enable sift logging with the rolling log file in Fuse, add the following entry to the etc/org.ops4j.pax.logging.cfg file:
# Sift appender
log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
log4j.appender.sift.key=bundle.name
log4j.appender.sift.default=servicemix
log4j.appender.sift.appender=org.apache.log4j.RollingFileAppender
log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
log4j.appender.sift.appender.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %m%n
log4j.appender.sift.appender.file=${karaf.data}/log/$\\{bundle.name\\}.log
log4j.appender.sift.appender.append=true
log4j.appender.sift.appender.maxFileSize=1MB
log4j.appender.sift.appender.maxBackupIndex=10
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments