Log

Table of Contents

Usage
Properties

Creates log messages using the Simple language

Usage

The Log pattern uses a simple language expression to write messages to the log. Messages are logged at INFO level.

The Log pattern can be placed anywhere in the body of a route.

Properties

Table 32, “Log Properties” describes the properties you can specify using the properties editor.

Table 32. Log Properties

NameDescription

Message

Specifies a Simple language expression that defines the log message.

Description

Specifies a text description for the node. This description is included in the generated XML file, but it is informational only. It is not used by Apache Camel.

Id

Specifies a unique identifier for the endpoint.

The tooling automatically generates an id for a node when it is created, but you can remove that id or replace it with your own. The Camel debugger requires all nodes with a breakpoint set to have a unique id.

You can use the id to refer to endpoints in your Camel XML file.

Log Name

Specifies the name of the log into which messages are written.

Logger Ref

[Camel 2.13.1/2.14.4] Specifies the reference to the particular logger instance to use inside OSGi (JBoss Fuse/Karaf). [QUESTION: Is the reference the name of the logger instance or does it require ? logger=#myLogger URI syntax?] This option requires that a single instance of slf4j.Logger be installed in the Registry. For details, see http://camel.apache.org/log.html.

Logging Level

Specifies the logging level at which the message is recorded.

  • DEBUG
  • ERROR
  • INFO
  • TRACE
  • WARN
  • OFF

Marker

Specifies the name of an optional marker used to enrich logging messages. Conforming SLF4J logging implementations determine how the information conveyed by markers is used.