Skip to content

Debugging

These functions (except for nanoTime()) inject an MDC filter key into the logging system during expression execution, allowing a specific expression’s activity to be easily located in the logs. This filter key will be attached to all logging that occurs within the inner expression, even when not originating from a Integration Toolkit function.

In addition, when nested within either debugMe() and traceMe(), all of the Integration Toolkit functions, if they have any logging at all, will use the WARN log level instead of the normal DEBUG or TRACE level (as selected) while the corresponding MDC filter key is present. This avoids the need to alter your gateway’s logging configuration to invoke these keys when you are only interested in a Integration Toolkit function’s log entries.

debugMe()

debugMe(mdcValue, expression) returns Object

mdcValue
A string to be attached to all logging that occurs within the nested expression via the MDC key “debugme”.
expression
A nested expression, the result of which becomes the outer return value.

Other Integration Toolkit expression functions will use WARN instead of DEBUG log level within this nested expression.

If this function is nested within itself, the identification strings will be concatenated with a forward slash within the nested section.

traceMe()

traceMe(mdcValue, expression) returns Object

mdcValue
A string to be attached to all logging that occurs within the nested expression via the MDC key “traceme”.
expression
A nested expression, the result of which becomes the outer return value.

Other Integration Toolkit expression functions will use WARN instead of DEBUG or TRACE log levels within this nested expression.

If this function is nested within itself, the identification strings will be concatenated with a forward slash within the nested section.

timeMe()

timeMe(mdcValue, expression) returns Object

mdcValue
A string to be attached to all logging that occurs within the nested expression via the MDC key “timeme”.
expression
A nested expression, the result of which becomes the outer return value.

Upon completion, will log the duration of the nested expression’s execution, just before removing the MDC key.

If this function is nested within itself, the identification strings will be concatenated with a forward slash within the nested section.

nanoTime()

nanoTime() returns Long

When trying to measure performance beyond a single expression, Java’s System.nanoTime() is invaluable. This expression function simply calls that function and returns the 64-bit nanosecond-precision value.