Camel Log EIP does not log to configured log file

Solution Verified - Updated -

Issue

Using a custom OPS4J configuration I expect all logging coming from Camel to go into a separate log file, however logging from the Camel Log Enterprise Integration Pattern (EIP) does not get written to that custom log file but instead appears in the default data/log/fuse.log.

The Camel route uses the Camel Log EIP as follows:

<camelContext xmlns="http://camel.apache.org/schema/blueprint" id="..." >
  <route id="..." >
    <from uri="activemq:queue:jms-localtx-demo.in" />
    <log message="Processing message from queue jms-localtx-demo.in." />
     ...
  </route>
</camelContext>

The OPS4J logging configuration in $FUSE_HOME/etc/org.ops4j.pax.logging.properties uses

# relevant Log4J Appender configuration
log4j.appender.appLog = org.apache.log4j.RollingFileAppender
log4j.appender.appLog.file = /opt/rh/jboss-fuse-6.3.0.redhat-310/data/log/appLog.log
log4j.appender.appLog.append = true
...

# Log4J log level configuration
log4j.logger.org.apache.camel = INFO, appLog
log4j.additivity.org.apache.camel = false

It configures all logging for package org.apache.camel to only go into log file data/log/appLog.log.

Environment

  • JBoss Fuse 6.3
  • Camel Log EIP
  • custom OPS4J Logging configuration

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.