2 Home
gitea_admin edited this page 2026-03-11 14:41:06 +00:00

Log Data

Prints data form the routed message (such as body and headers) to the logger.

Metadata

Property Value
Scheme log
Support Level Stable
Labels core,monitoring
Version 4.10.2

Maven Dependency

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-log</artifactId>
    <version>4.10.2</version>
</dependency>

Endpoint Properties

Name Type Required Default Description
loggerName string Name of the logging category to use
groupActiveOnly boolean true If true, will hide stats when no new messages have been received for a time interval, if false, show stats regardless of message traffic.
groupDelay integer Set the initial delay for stats (in millis)
groupInterval integer If specified will group message stats by this time interval (in millis)
groupSize integer An integer that specifies a group size for throughput logging.
level string INFO Logging level to use. The default value is INFO.
logMask boolean If true, mask sensitive information like password or passphrase in the log.
marker string An optional Marker name to use.
plain boolean false If enabled only the body will be printed out
sourceLocationLoggerName boolean false If enabled then the source location of where the log endpoint is used in Camel routes, would be used as logger name, instead of the given name. However, if the source location is disabled or not possible to resolve then the existing logger name will be used.
lazyStartProducer boolean false Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing.
exchangeFormatter object To use a custom exchange formatter
maxChars integer 10000 Limits the number of characters logged per line.
multiline boolean false If enabled then each information is outputted on a newline.
showAll boolean false Quick option for turning all options on. (multiline, maxChars has to be manually set if to be used)
showAllProperties boolean false Show all of the exchange properties (both internal and custom).
showBody boolean true Show the message body.
showBodyType boolean true Show the body Java type.
showCachedStreams boolean true Whether Camel should show cached stream bodies or not (org.apache.camel.StreamCache).
showCaughtException boolean false If the exchange has a caught exception, show the exception message (no stack trace). A caught exception is stored as a property on the exchange (using the key org.apache.camel.Exchange#EXCEPTION_CAUGHT) and for instance a doCatch can catch exceptions.
showException boolean false If the exchange has an exception, show the exception message (no stacktrace)
showExchangeId boolean false Show the unique exchange ID.
showExchangePattern boolean false Shows the Message Exchange Pattern (or MEP for short).
showFiles boolean false If enabled Camel will output files
showFuture boolean false If enabled Camel will on Future objects wait for it to complete to obtain the payload to be logged.
showHeaders boolean false Show the message headers.
showProperties boolean false Show the exchange properties (only custom). Use showAllProperties to show both internal and custom properties.
showRouteGroup boolean false Show route Group.
showRouteId boolean false Show route ID.
showStackTrace boolean false Show the stack trace, if an exchange has an exception. Only effective if one of showAll, showException or showCaughtException are enabled.
showStreams boolean false Whether Camel should show stream bodies or not (eg such as java.io.InputStream). Beware if you enable this option then you may not be able later to access the message body as the stream have already been read by this logger. To remedy this you will have to use Stream Caching.
showVariables boolean false Show the variables.
skipBodyLineSeparator boolean true Whether to skip line separators when logging the message body. This allows to log the message body in one line, setting this option to false will preserve any line separators from the body, which then will log the body as is.
style object Default Sets the outputs style to use.