To specify the desired commit script output—including warning, error, and system log messages, persistent changes, and transient changes—the script can contain tags that appear in any order, in any number. The tags for specifying output are as follows:
Generates a persistent change relative to the current context node as defined by an XPath expression.
Generates a transient change relative to the current context node as defined by an XPath expression.
Generates a warning message in conjunction with a configuration change. You can use this set of tags to generate a notification that the configuration has been changed.
For more information about the <jcs:emit-change> template, see <jcs:emit-change> Template.
The JUNOS software processes this output and performs the appropriate actions. Errors and warnings are passed back to the JUNOS CLI or to a JUNOScript client application. The presence of an error automatically causes the commit operation to fail. Persistent and transient changes are loaded into the appropriate configuration database.
To test the output of error, warning, and system log messages from commit scripts, issue the commit check | display xml command:
- [edit]
- user@host# commit check | display xml
To display a detailed trace of commit script processing, issue the commit check | display detail command:
- [edit]
- user@host# commit check | display detail
![]() |
Note: System log messages do not appear in the trace output, so you cannot use the commit check operation to test script-generated system log messages. Furthermore, system log messages are written to the system log during a commit operation, but not during a commit check operation. |