Logs the keys and their values of a map a into the job log if b is "true". The return value is the number of elements being logged or "-1" if no logging has taken place or the dump of the map (see parameter d).
This function is mainly used during the development of the profile.
Note: Please note that this function writes "hidden values" into the log like real values. See the explanations for the Empty Flag.
Parameters
Parameter | Description |
|---|---|
a | Name of the map. |
b | Must be true for the dump to be executed. |
c | If true, the dump is performed into the "Additional info" tab instead of to the normal job log. Default: false. |
d | If true, the dump of the map is returned if there was a dump, otherwise, an empty string. If false, the number of map elements is returned if there was a dump, otherwise, -1. Default: false. |
Examples
Assume a map MyMap with elements {key1=val1, key2=val2, key3=val3}. The system variable VAR_IS_TEST has value true, the system variable VAR_IS_NOT_TEST has value false.
Parameter a | b | c | d | Result | Dump |
|---|---|---|---|---|---|
MyOtherMap | false | -1 | No. | ||
MyOtherMap | true | -1 | No. | ||
MyMap | Variable: VAR_IS_NOT_TEST | -1 | No. | ||
MyMap | Variable: VAR_IS_TEST | 3 | Yes. | ||
MyMap | true | true | 'key1'='val1''key2'='val2''key3'='val3' | Yes. |
In the last case, the following is written into the job log.
[M:] Dump of map MyMap:
'key1'='val1'
'key2'='val2'
'key3'='val3'Due to technical reasons, the order of the keys in the logs is random.