Prepend a Prefix
To prepend a string to every system log message sent to a remote machine, include the
log-prefixstatement along with thefacilitystatements at the[edit system syslog hosthostname]hierarchy level:[edit system syslog hosthostname]facility level;log-prefixstring;The
log-prefixstring can contain any alphanumeric character other than a space, the equal sign ( = ), or the colon ( : ). A colon and a space are appended to the string when the system log messages are written to the log.Example: Prepend a Prefix
Prepend the string
M40to all messages generated on the router to indicate that the router is an M40, and send the messages to the remote machinehardware-logger:[edit system syslog]host hardware-logger {any info;log-prefix M40 ;}When these configuration statements are included on the router
original1, a message in the system logging file onhardware-loggerlooks like the following:Mar 9 17:33:23 original1 M40: mgd[477]: UI_CMDLINE_READ_LINE: user `root', command `run show version'