LogVar
Adds a new entry into the logic log that describes the resulting value of an expression. The message always appears at the SEVERE level and is of the following format:
expression -> value type: value representation
Should the expression not produce a valid value, or generate an error, the message will report that instead of the value information.
Attributes
value | ||
---|---|---|
Required | Value type | EL-evaluated |
Yes | String | Yes |
The resulting value of this attribute's expression is the one to be described. |
Examples
The logVar
command is best suited for inspecting values of variables. Using it should be fairly simple:
<logVar value="${someVariable}">Output: "${someVariable} -> Boolean: true"
The type of the value can be important information, as the text representation of the value can be ambiguous. In the above example the value of "someVariable" is a Boolean "true" and displayed as "true" when printed out. However, a value could also be a String with the characters "true" and it would displayed as text in the exact same way as the Boolean. If your logic seems to behave in odd ways, try checking values of key variables with logVar
to see if one of them might be of an unexpected type that could cause, for example, a conditional expression to always unintendedly succeed.