Adding a String to System Log Messages
To add a text string to every system log message directed to a remote machine or to the other Routing Engine, include the
log-prefixstatement at the[edit system syslog host]hierarchy level:[edit system syslog host (hostname| other-routing-engine)]facility severity;log-prefixstring;The string can contain any alphanumeric or special character except the equal sign (=) and the colon (:). It also cannot include the space character; do not enclose the string in quotation marks (" ") in an attempt to include spaces in it.
A colon and a space are appended to the string when the system log messages are written to the log. The string is inserted after the identifier for the Routing Engine that generated the message.
Example: Adding a String
Add the string
M40eto all messages to indicate that the router is an M40e router, and direct the messages to the remote machinehardware-logger.mycompany.com:[edit system syslog]host hardware-logger.mycompany.com {any info;log-prefix M40e;}When these configuration statements are included on an M40e router called
origin1, a message in the system logging file onhardware-loggerlooks like the following:Mar 9 17:33:23 origin1 M40e: mgd[477]: UI_CMDLINE_READ_LINE: user 'root', command 'run show version'