194 Cisco LAN Switching Configuration Handbook
■ Logging displays all error and debug messages by default. The logging level can be
set to determine which messages should be sent to each of the facilities.
■ Timestamping logging messages or setting the syslog source address can help in real-
time debugging and management. If the time and date are set on a switch, the switch
can provide timestamps with each syslog message. The clocks in all switches can be
synchronized so that it becomes easier to correlate syslog messages from several
devices.
■ System messages are logged with the following format:
■ timestamp %function-severity-MNEMONIC:description
where the timestamp denotes the time of the event, %function is the switch func-
tion (also called facility) generating the event,
severity is the severity level (0 to
7, lower is more severe) of the event, and
MNEMONIC is a text string that briefly
describes the event. A more detailed
description text string completes the
message.
An example of a severity level 3 Supervisor IOS system message follows:
■ 11w1d: %LINK-3-UPDOWN: Interface FastEthernet0/10, changed state to
up
An example of a severity level 5 Catalyst OS system message is as follows:
■ 2001 Dec 20 11:44:19 %DTP-5-NONTRUNKPORTON:Port 5/4 has become non-
trunk
Note Logging to a syslog server uses UDP port 514.
Configuration
1. (Optional) Enable or disable logging:
(global) [no] logging on
Logging is enabled by default. Use the no keyword to disable all logging on the
switch, except for logging to the console.
2. (Optional) Log messages to a syslog server.
a. Identify the syslog server:
(global) logging syslog-host
Text messages are sent to the syslog server at syslog-host (hostname or IP
address). The messages are captured and can be reviewed on the syslog server.
b. Send messages to a syslog facility:
(global) logging facility facility-type