Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h2. PaxLogging component
*Available in Camel 2.6*

The {{paxlogging}} component can be used in an OSGi environment to receive [PaxLogging|http://wiki.ops4j.org/display/paxlogging/Pax+Logging] events and process them. 

h3. Dependencies
Maven users need to add the following dependency to their {{pom.xml}}
{code:xml}
<dependency>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-paxlogging</artifactId>
  <version>${camel-version}</version>
</dependency>
{code}
where {{$\{camel-version\}}} must be replaced by the actual version of Camel (2.6.0 or higher). 

h3. URI format
{code:xml}
paxlogging:appender[?options]
{code}
where {{appender}} is the name of the pax appender that need to be configured in the PaxLogging service configuration.

h3. URI options

{div:class=confluenceTableSmall}
|| Name || Default value || Description ||
{div}

h3. Message headers

{div:class=confluenceTableSmall}
||Name||Type||Message ||Description||
{div}

h3. Message body
The {{in}} message body will be set to the received PaxLoggingEvent.

h3. Example usage
{code:xml}
<route>
    <from uri="paxlogging:camel"/>
    <to uri="stream:out"/>
</route>
{code}

Configuration:
{code}
log4j.rootLogger=INFO, out, osgi:VmLogAppender, osgi:camel
{code}