[Contents] [Prev] [Next] [Index] [Report an Error]

Logging Macro Results

You can use the env.setResult command to set parameters within a macro to display information through the macroData log file. When defined, parameter information appears in the macroData log file at the NOTICE severity level following the completion of the macro.

The following example defines several results (1 through 5):

<# numberMacro #>
<# env.setResult("A", “ “ $1 ) #>
<# env.setResult("A", “ “ $2 ) #>
<# env.setResult("A", “ “ $3 ) #>
<# env.setResult("A", “ “ $4 ) #>
<# env.setResult("A", “ “ $5 ) #>
<#endtmpl#>

Each value is sent to the macroData log file, starting with 1 and ending with 5. Each successive value overwrites the previous value in the log file. In other words, if the macro ends after setting the third result (that is, 3) the log file displays the following:

A is 3

If the macro finishes completely, the log file displays the following:

A is 5


[Contents] [Prev] [Next] [Index] [Report an Error]