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:
■
■
Note Logging to a syslog server uses UDP port 514.
Configuration
(Optional) Enable or disable logging:
1.
(global) [no] logging on
Logging is enabled by default. Use the
switch, except for logging to the console.
(Optional) Log messages to a syslog server.
2.
a. Identify the syslog server:
b. Send messages to a syslog facility:
timestamp %function-severity-MNEMONIC:description
where the
timestamp
tion (also called facility) generating the event,
7, lower is more severe) of the event, and
describes the event. A more detailed
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
(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.
(global) logging facility facility-type
denotes the time of the event,
MNEMONIC
description
keyword to disable all logging on the
no
is the switch func-
%function
is the severity level (0 to
severity
is a text string that briefly
text string completes the