logging hostnameprefix
To append a hostname prefix to system logging (syslog) messages logged to syslog servers, use the
logging
hostnameprefix
command in global configuration mode. To remove the
logging hostnameprefix
command
from the configuration file and disable the logging host name prefix definition, use the
no
form of this command.
logging hostnameprefix hostname
no logging hostnameprefix
Syntax Description
Hostname that appears in messages sent to syslog servers.
hostname
Command Default
No hostname prefix is added to the messages logged to the syslog servers.
Command Modes
Global configuration
Command History
Modification
Release
This command was introduced.
Release 3.2
Usage Guidelines
Use the
logging hostnameprefix
command to append a hostname prefix to messages sent to syslog servers
from the router. You can use these prefixes to sort the messages being sent to a given syslog server from
different networking devices.
Use the
logging, on page 308
command to specify a syslog server host as a destination for syslog messages.
Task ID
Operations
Task ID
read, write
logging
Examples
This example shows how to add the hostname prefix host1 to messages sent to the syslog servers from the
router:
RP/0/0/CPU0:router(config)#
logging hostnameprefix host1
Cisco IOS XR System Monitoring Command Reference for the Cisco XR 12000 Series Router, Release 4.1
OL-24735-01
329
Logging Services Commands
logging hostnameprefix