To define a remote SYSLOG server where log messages are sent (using the SYSLOG protocol), use the logging host Global Configuration
mode command.
To delete a SYSLOG server, use the no form of this command.
Syntax
logging host {ipv4-address | ipv6-address | hostname} [facility facility] [port port] [severity severity_level]
no logging host {ip-address | ipv6-address | hostname}
Parameters
ipv4-address—IPv4 address of the SYSLOG server.
ipv6-address—IPv6 address of the SYSLOG server.
hostname—Hostname of the SYSLOG server. Only translation to IPv4 addresses is supported.
facility facility—(Optional) Specifies the log facility that is indicated in the message. It can be one of the following values: local0, local1,
local2, local3, local4, local5, local 6, and local7. The default is local7.
port port—(Optional) Specifies the port number for SYSLOG messages. The default port number is 514. (Range: 0 to 65535)
severity level—(Optional) Specifies the severity of log messages sent to the SYSLOG server. The optional severity levels are:
<0-7> Minimum severity <0-7> (EMEGR-DEBUG)
emergencies System is unusable
alerts Immediate action needed (severity=1)
critical Critical conditions (severity=2)
errors Error conditions (severity=3)
warnings Warning conditions (severity=4)
notifications Normal but significant conditions (severity=5)
informational Informational messages (severity=6)
debugging Debugging messages (severity=7)
Default Configuration
No messages are logged to a SYSLOG server.
The default severity level is Informational.
Command Mode
Global Configuration mode
User Guidelines
You can specify multiple SYSLOG servers.
Example
switchxxxxxx(config)# logging host 1.1.1.121
switchxxxxxx(config)# logging host 3000::100
switchxxxxxx(config)# logging host SYSLOG1