-
1. Re: RED HAT JBOSS FUSE ESB 6.00 Logging sperately for each bundle
ffang Nov 17, 2013 7:40 PM (in response to atiato78)Hi,
Use MDC Sift appender you can get log file per bundle.
edit
etc/org.ops4j.pax.logging.cfg
change
# Root logger
from
log4j.rootLogger=INFO, out, osgi:VmLogAppender
to
log4j.rootLogger=INFO, sift, osgi:VmLogAppender
Freeman
-
2. Re: RED HAT JBOSS FUSE ESB 6.00 Logging sperately for each bundle
davsclaus Nov 18, 2013 5:52 AM (in response to atiato78)AFAIR you can find information about how to log per bundle in the Fuse docs at
-
3. Re: RED HAT JBOSS FUSE ESB 6.00 Logging sperately for each bundle
ksimpson Dec 4, 2013 4:03 PM (in response to ffang)Also encountering issues with logging per bundle. Replaced 'out' appender with 'sift', but a log file is not created for the application bundle.
Instead, the following logging files are created (after running a simple Camel test against deployed bundle):
- org.apache.camel.camel-core.log
- org.apache.felix.fileinstall.log
How can Fuse be configured to ACTUALLY log everything from a bundle to the same file?
-
4. Re: RED HAT JBOSS FUSE ESB 6.00 Logging sperately for each bundle
atiato78 Dec 5, 2013 2:38 AM (in response to atiato78)Dear Kevan,
I understand that you would like to log each bundle or application separately , you have to add the following as spring to camel-context.xml
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass">
<value>org.apache.log4j.MDC</value>
</property>
<property name="targetMethod">
<value>put</value>
</property>
<property name="arguments">
<list>
<value>app.name</value>
<value>touch-nthlr</value>
</list>
</property>
</bean>
make sure log4j bundle is deployed inside JBOSS ESB.
and you should add the following inside org.ops4j.pax.logging.cfg under etc folder
# Sift appender
log4j.appender.sift=org.apache.log4j.sift.MDCSiftingAppender
log4j.appender.sift.key=app.name
log4j.appender.sift.default=servicemix
#log4j.appender.sift.appender=org.apache.log4j.FileAppender
log4j.appender.sift.appender=org.apache.log4j.DailyRollingFileAppender
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/$\\{app.name\\}.log
log4j.appender.sift.appender.append=true
note that the above is using DailyRolling File appender which rename the log every day and generate a new log for the Apps.
thanks,
Omar Atia
-
5. Re: RED HAT JBOSS FUSE ESB 6.00 Logging sperately for each bundle
kkrishnashankar Jan 14, 2016 2:31 PM (in response to atiato78)Hello Omar,
Tried above configuration changes but unable to find app based log under ${karaf.data}/log/$\\{app.name\\}.log
what do you mean exactly by "make sure log4j bundle is deployed inside JBOSS ESB."
Regards,
krishan
-
6. Re: RED HAT JBOSS FUSE ESB 6.00 Logging sperately for each bundle
kkrishnashankar Jan 14, 2016 3:07 PM (in response to atiato78)FYi - Log4j installed in maven repository ,
Is that you meant by "make sure log4j bundle is deployed inside JBOSS ESB."??
-
7. Re: RED HAT JBOSS FUSE ESB 6.00 Logging sperately for each bundle
kkrishnashankar Jan 14, 2016 4:27 PM (in response to davsclaus)Hello Claus,
Unable to open link
https://access.redhat.com/site/documentation/JBoss_Fuse/
Thanks,
krishna
-
8. Re: RED HAT JBOSS FUSE ESB 6.00 Logging sperately for each bundle
kkrishnashankar Jan 15, 2016 10:44 AM (in response to davsclaus)Hello Claus,
Are you referring to below link?
Fuse ESB Enterprise - Configuring and Running Fuse ESB Enterprise - Logging per Application
Thanks,
Krishna