EasyManua.ls Logo

Juniper SYSTEM BASICS - CONFIGURATION GUIDE V 11.1.X

Juniper SYSTEM BASICS - CONFIGURATION GUIDE V 11.1.X
640 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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
Viewing Macro Errors
You can view macro error information in the macroData log file using the show log
data command and specifying the macroData keyword for the category.
NOTE: Each execution of a macro, by any user and by any name, obtains a unique
ID. This ID appears in the starting and ending message of the macro output and for
each log message in the macroData log.
show log data
Use to display log event data using the category keyword and the macroData
category.
deltaLimits the display to events that occurred after the time set with the log
baseline command.
severityDisplays events that have a specific severity level.
Example
host1(config)# show log data category macroData severity debug
NOTICE 01/07/2006 09:46:57 macroData: Macro 'badInterfaceCommandMacro' in file 'testInterfaceCommand.mac'
starting execution (Id: 402) on vty, 0
ERROR 01/07/2006 09:46:57 macroData: (Id: 402) Command error: interface fastEthernet 500, Command execution
492 Detecting and Recording Macro Errors
JUNOSe 11.1.x System Basics Configuration Guide

Table of Contents

Related product manuals