Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Information about looking up logger instance in Registry

...

Info
titleDifference between log in the DSL and [Log] component

The log DSL is much lighter and meant for logging human logs such as Starting to do ... etc. It can only log a message based on the Simple language. On the other hand Log component is a full fledged component which involves using endpoints and etc. The Log component is meant for logging the Message itself and you have many URI options to control what you would like to be logged.

Info
titleUsing Logger instance from the the Registry

From Camel 2.12.4/2.13.1, if no logger name or logger instance is passed to log DSL, there's a Registry lookup performed to find single instance of org.slf4j.Logger. If such instance is found, it is used instead of creating a new logger instance. If more instances are found, the behavior defaults to creating a new instance of logger.

Tip
titleLogging message body with streamed messages

If the message body is stream based, then logging the message body, may cause the message body to be empty afterwards. See this FAQ. For streamed messages you can use Stream caching to allow logging the message body and be able to read the message body afterwards again.

...