Supported Platforms
Related Documentation
- EX, M, MX, PTX, T Series, QFX Series standalone switches
- Specifying Log File Size, Number, and Archiving Properties
- M, PTX, T Series
- Single-Chassis System Logging Configuration Overview
- QFX Series standalone switches
- Overview of Single-Chassis System Logging Configuration
Adding a Text 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-prefix statement at the [edit system syslog host] hierarchy level:
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.
The Junos OS system logging utility automatically appends a colon and a space to the specified 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.
The following example shows how to add the string M120 to all messages to indicate that the router is an M120 router, and direct the messages to the remote machine hardware-logger.mycompany.com:
When these configuration statements are included on an M120 router called origin1, a message in the system log on hardware-logger.mycompany.com looks like the following:
Related Documentation
- EX, M, MX, PTX, T Series, QFX Series standalone switches
- Specifying Log File Size, Number, and Archiving Properties
- M, PTX, T Series
- Single-Chassis System Logging Configuration Overview
- QFX Series standalone switches
- Overview of Single-Chassis System Logging Configuration
Published: 2014-07-23
Supported Platforms
Related Documentation
- EX, M, MX, PTX, T Series, QFX Series standalone switches
- Specifying Log File Size, Number, and Archiving Properties
- M, PTX, T Series
- Single-Chassis System Logging Configuration Overview
- QFX Series standalone switches
- Overview of Single-Chassis System Logging Configuration