Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
from("direct:start").log(LoggingLevel.DEBUG, "Processing ${id}").to("bean:foo");

and to set a logger name

Code Block

from("direct:start").log(LoggingLevel.DEBUG, "com.mycompany.MyCoolRoute", "Processing ${id}").to("bean:foo");

For example you can use this to log the file name being processed if you consume files.

...

Code Block
xml
xml
        <route id="baz">
            <from uri="direct:baz"/>
            <log message="Me Got ${body}" loggingLevel="FATAL" logName="coolcom.mycompany.MyCoolRoute"/>
            <to uri="mock:baz"/>
        </route>

...

Code Block
xml
xml
        <route id="baz">
            <from uri="direct:baz"/>
            <log message="Me Got ${body}" loggingLevel="FATAL" logName="coolcom.mycompany.MyCoolRoute" marker="myMarker"/>
            <to uri="mock:baz"/>
        </route>

...