I have setup a logging channel adapter as shown.
<int:logging-channel-adapter id="logger" logger-name="messages"
expression="payload.toLogString()" level="????" />
For the level I want a SpEL expression that accomplishes the logic
if(headers.isSet("LoggingLevel"))
level = headers.get("LoggingLevel);
else
level = "INFO";
Preferably using the ternary operator.