integration - Show request in Camel route

Is there any way to log request from body in camel route?

<camel:log message="RequestType [${request.body.request}]" loggingLevel="INFO" />

Error in logs:

Caused by: org.apache.camel.language.simple.types.SimpleParserException: Unknown function: request.body.request

This is working part, but dunno how to get into field :

        <camel:log message="RequestType ${in.body}" loggingLevel="INFO" />
        <camel:log message="RequestType2 [${body}]" loggingLevel="INFO" />

Request field for sure it's not empty becaue later I'm checking it:

<camel:ognl>request.body.request instanceof ...

1 Answer

  1. Colin- Reply

    2019-11-13

    Try with

    <camel:log message="RequestType [${body.request}]" loggingLevel="INFO" />
    

    The camel:log is using the simple language which you can read more about here: http://camel.apache.org/simple

Leave a Reply

Your email address will not be published. Required fields are marked *

You can use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>