MidPoint has ability to trace mappings, expressions and scripts. These three mechanism for a hierarchy: mappings may contain expressions, expressions may contain scripts. Therefore enabling each level gradually gives more details but also floods the logs with more information. Each level is summarized in the following table:
|Mapping trace||Gives information about the whole mapping. It describes what were the mapping sources, what was the final result (as triple). The output is usually quite compact.|
Note: does not work for filter or correlation expressions as there are not mappings.
|Expression trace||Gives information about every expression that is evaluated in the system. It provides details about expression inputs (variables) and outputs. This is still quite general and it still works with relative information (triples and deltas). This provides a lot of output.|
|Scrip trace||Gives information about every script expression that is evaluated. It provides very detailed information about each script run (script expressions are often evaluated twice in relativistic situations: with old values and with new values). This provides a lot of very detailed information.|
Loggers and Explicit Traces
Mapping, expression and script tracing can be enabled by setting their respective loggers to the TRACE level. This will enable tracing of all the mappings, expressions or scripts respectively. The messages will be logged at TRACE level.
Since midPoint 3.4.1 and 3.5 there is a way how to enable tracing of each individual mapping, expression or tracing. Simple set configuration property
trace to true value:
Expression trace looks like this:
The trace shows each execution of each expression. The meaning of individual fields is a follows:
Human-readable name of the expression language
Expected expression return type. Also indication whether it is scalar (single value) or list (multiple values). This may affect the way how some of the expression languages evaluate the expression and interpret the result.
Detailed dump of variable content. Each variable dump starts with variable name. The dump format of prism objects is usual Prism Dump Format. Variable names are QNames and they are dumped as such. However, some expression languages may use only the local part of the variable name. Variable with
Expression code in a raw form with all applicable namespace prefix declarations.
Expression evaluation result in a Prism Dump Format.