FUSE ESB uses the OPS4j Pax Logging system, a standard OSGi logging service that also supports the following APIs:
Apache Log4j
Apache Commons Logging
SLF4J
Java Util Logging
Three
configuration files in the
directory are used in configuring FUSE ESB logging:InstallDir/etc
org.ops4j.pax.logging.cfg
Uses standard Log4j configuration to set the root logger's level to
INFO and to define two appenders: one for the console and one for
the log file. The console's appender is disabled by default. To enable it, add
log4j.appender.stdout.append=true to the .cfg
file.
org.apache.felix.karaf.log.cfg
Configures the output of the log console commands.
system.properties
Contains one property,
org.ops4j.pax.logging.DefaultServiceLog.level, which sets the
logging level early in the boot process when the pax-logging service it not yet
available. This is set to ERROR by default.
The default logging configuration sets the logging levels so that the log file will provide enough information to monitor the behavior of the runtime and provide clues about what caused a problem. However, the default configuration will not provide enough information to debug most problems.
The most useful logger to change when trying to debug an issue with FUSE ESB is the root
logger. You will want to set its logging level to DEBUG in the
org.ops4j.pax.logging.cfg file.
Example 4.1. Changing Logging Levels
# Root logger log4j.rootLogger=DEBUG, out, osgi:VmLogAppender ...
When debugging a problem in FUSE ESB you may want to change the level of logging
information that is displayed on the console. Example 4.2 shows an example of setting the root logger to DEBUG but limiting the
information displayed on the console to WARN.
Example 4.2. Changing the Log Information Displayed on the Console
log4j.rootLogger=DEBUG, stdout, osgi:VmLogAppender
...
log4j.appender.stdout.threshold=WARN
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
...For more information on Pax logging, see http://wiki.ops4j.org/display/paxlogging/Pax+Logging.