-
1. Re: Logging per bundle and selecting specific bundles in JBOSS FUSE
vrlgohel May 8, 2017 4:20 AM (in response to alok.s.jadhav)The links that you referred allow you to configure separate log file per route in Fuse using PAX Logging. If that is what you need, than you need to use the
useMDCLogging="true"
attribute in yourcamel-context
and add below sample configuration in your logging configuration file(<Fuse_HOME>/etc/org.ops4j.pax.logging.cfg)
:...
log4j.rootLogger=INFO, async, camel-mdc, osgi:*
...
# Camel MDC appender
log4j.appender.camel-mdc=org.apache.log4j.sift.MDCSiftingAppender
log4j.appender.camel-mdc.key=camel.routeId
log4j.appender.camel-mdc.default=servicemix
log4j.appender.camel-mdc.appender=org.apache.log4j.FileAppender
log4j.appender.camel-mdc.appender.layout=org.apache.log4j.PatternLayout
log4j.appender.camel-mdc.appender.layout.ConversionPattern=%d{ISO8601} | %-5.5p | %-16.16t | %-32.32c{1} | %X{camel.exchangeId} | %m%n
log4j.appender.camel-mdc.appender.file=${karaf.data}/log/camel-$\\{camel.routeId\\}.log
log4j.appender.camel-mdc.appender.append=true