Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Log a Message About a Commit Operation Using the Junos XML Protocol

In a Junos XML protocol session with a device running Junos OS, to log a comment when performing a commit operation, a client application encloses the <log> tag element in <commit-configuration> and <rpc> tag elements:

The <log> element can be combined with other tags within the <commit-configuration> tag element (the <at-time>, <confirmed/>, and <confirm-timeout>, or <synchronize/> tag elements) and does not change the effect of the operation. When the <log> tag element is emitted by itself, the associated commit operation begins immediately.

The following example shows how to log a message as the candidate configuration is committed.

The commit history, which includes any commit comments, stores an entry for each pending commit and up to 50 previous commits for the standard configuration database. To request the history, a client application encloses the <get-commit-information/> tag in <rpc> tag elements. The equivalent operational mode CLI command is show system commit.

The Junos XML protocol server encloses the information in <commit-information> and <rpc-reply> tag elements. For information about the child tag elements of the <commit-information> tag element, see its entry in the Junos XML API Operational Developer Reference.

The following example shows how to request the commit log.