trace() Function (Python, SLAX, and XSLT)
Namespaces
http://xml.juniper.net/junos/commit-scripts/1.0 http://xml.libslax.org/slax
Python Syntax
jcs.trace(string)
SLAX Syntax
expr prefix:trace(string);
XSLT Syntax
<xsl:value-of select="prefix:trace(string)"/>
Description
Issue a trace message, which is sent to the trace file.
You must configure traceoptions
under the respective
script type in the configuration hierarchy in order to output a message
to the trace file using the trace()
function.
The output goes to the configured trace file. If traceoptions
is enabled, but no trace file is explicitly configured, the output
goes to the default trace file for that script type.
The prefix associated with the namespace URI should be defined in the prefix-to-namespace mapping in the style sheet.
Parameters
string |
String that is output to the trace file. |
Usage Examples
SLAX syntax:
expr jcs:trace('test');
XSLT syntax:
<xsl:value-of select="jcs:trace('test')"/>
Python syntax:
jcs.trace('test')
Release Information
Function introduced in Junos OS Release 7.6.
Support for the slax namespace http://xml.libslax.org/slax added in Junos OS Release 12.2.
Support for Python added in Junos OS Release 16.1R1 on QFX Series switches and ACX Series, MX Series, PTX Series, and T Series routers.
Support for Python added in Junos OS Release 17.1R1 on ACX500, ACX1000, ACX1100, ACX2000, ACX2100, ACX2200, and ACX4000 routers, and EX Series switches.
Support for Python added in Junos OS Release 17.3R1 on SRX1500, SRX4100, SRX4200, SRX5400, SRX5600, and SRX5800 devices and vSRX instances.
Support for Python added in Junos OS Release 18.3R1 on ACX5048 and ACX5096 routers.