2.5.2. logging host

Syntax

logging host (ip-addr|hostname) [facility facility] [port port] [severity sev]

no logging host (ip-addr|hostname)

Parameter

ipv4-addr

IPv4 address of the remote logging server.

hostname

Hostname of the remote logging server.

facility facility

Specify the facility of the logging messages. It can be on of the following value: local0, local1, local2, local3, local4, local5, local6, and local7. The default value of facility is local7.

portport

Specify the port number of the remote logging server.The valid range is from 0 to 65535, and the default value is 512.

severity sev

Specify the minimum severity of the logging messages. The valid range is from 0 to 7, and the number 0 to 7 represents emerg, alert, critical, error, warning, notice, info, and debug individually. The default value of minimum severity level is 5 (emerg, alert, crit, error,warning, notice).

Default

No remote logging destination is configured.

Mode

Global Configuration

Usage

To define the logging server, use the command logging host to add the remote logging server in the Global Configuration mode. Otherwise, use the command no logging host to remove the remote logging rules. For the host name configuration, logging service would try translating the host name to IP address directly. Add the logging host would be failed on the failure of host name translating.

Example

The following example adds the remote logging rules by IP and Hostname.

Switch(config)# logging host 1.2.3.4
Switch(config)# logging host SYSLOG