Sift Appender Logging

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Sift Appender Logging

Castyn
Greetings, I have edited my /etc/org.ops4j.pax.logging.cfg file to the following, to allow each bundle to create a separate log file. Unfortunately, the max file size and log indexing seems to not work when using the sift appender. I will attach the config file, but currently all the logs only write to a single log per app and it can grow to an unrestricted size instead of rolling properly.

What am I doing wrong that prevents the log files from being indexed and rolling over?

# Root logger
log4j.rootLogger = INFO, sift, osgi:VmLogAppender
log4j.throwableRenderer=org.apache.log4j.OsgiThrowableRenderer
 
log4j.appender.sift.key=app.name
log4j.appender.sift.appender.file=${karaf.data}/log/$\\{app.name\\}.log
 
# CONSOLE appender not used by default
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [%t] | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
 
# File appender
log4j.appender.out=org.apache.log4j.RollingFileAppender
log4j.appender.out.layout=org.apache.log4j.PatternLayout
log4j.appender.out.layout.ConversionPattern=%d [%t] | %-5.5p | %-16.16t | %-32.32c{1} | %X{bundle.id} - %X{bundle.name} - %X{bundle.version} | %m%n
log4j.appender.out.file=${karaf.data}/log/servicemix.log
log4j.appender.out.append=true
log4j.appender.out.maxFileSize=10MB
log4j.appender.out.maxBackupIndex=10
 
# Sift appender
log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
log4j.appender.sift.default=servicemix
log4j.appender.sift.appender=org.apache.log4j.FileAppender
log4j.appender.sift.appender.layout=org.apache.log4j.PatternLayout
log4j.appender.sift.appender.layout.ConversionPattern=%d [%t] | %-5.5p | %-16.16t | %-32.32c{1} | %m%n
log4j.appender.sift.appender.append=true
log4j.appender.sift.maxFileSize=10MB
log4j.appender.sift.maxBackupIndex=10
log4j.logger.org.apache.camel = INFO
Reply | Threaded
Open this post in threaded view
|

Re: Sift Appender Logging

Christian Mueller
Administrator
Did you report this issue to the Pax logging team? I don't know what do you
expect from the Camel team team?

Best,
Christian

Sent from a mobile device
Am 16.05.2012 21:11 schrieb "Castyn" <[hidden email]>:
Reply | Threaded
Open this post in threaded view
|

Re: Sift Appender Logging

Castyn
Was hoping someone had some experience in relation to karaf and using the pax sift appender with rolling logs, didn't think it was unreasonable.  I'll take it up with the PAX team or another resource.