23-11
Catalyst 2950 Desktop Switch Software Configuration Guide
78-14982-01
Chapter 23 Configuring System Message Logging Configuring System Message Logging

Logging Messages to a UNIX Syslog Daemon

Before yo u ca n send system log m essages to a UNIX syslog server, you must c onfigure the syslog
daemon on a U N IX ser ver. Log in as roo t, and p er form these steps :
Note Som e recent versi ons of UNIX syslog da emons no longer ac cept by default syslog pac kets from the
network. If this is the case with your system, use the UNIX man syslogd command to determine what
options must be added t o or removed from the syslog command lin e to enable logging of remote syslog
messages.
Step 1 Add a line such as the following to the file /etc/syslog.conf:
local7.debug /usr/adm/logs/cisco.log
The local7 keyword specifies the logging facility to be used ; see Table 23-4 on page 23-12 for
informatio n on the f acilities. The debug ke yword specifies the syslog level; see Table 23-3 on page 23-9
for information on th e severity levels. The syslog d aemon sends m essages at this level or at a more
severe level to the file specified in the next field. The file must already exist, and the syslog daemon
must have permission to write to it.
Step 2 Creat e the log file by entering these c omma nds at the UN IX shell prompt:
$ touch /var/log/cisco.log
$ chmod 666 /var/log/cisco.log
Step 3 Make sure the syslog daemon reads the new changes:
$ kill -HUP `cat /etc/syslog.pid`
For more information, see th e man syslog.conf and man sys logd com mand s on y our UN IX sy stem .

Configuring the UNIX System Logging Facility

When sending system log messa ges to an external device, you can cause the swit ch to identif y its
messages as originating fr om any of the UNIX syslog facilities.
Beginning in privileged EXEC mode, follow these s teps to configure UNIX system facility message
logging:
Command Purpose
Step 1 configure terminal Enter glob al co nfigur atio n mo de .
Step 2 logging host Log messages to a UNIX syslog server host by entering its IP address.
To build a list of syslog servers that receive logging messages, enter this
comm an d m or e t ha n o nce.
Step 3 logging tr ap level Limit messa ges log ged to the sy slog servers.
Be default, syslog servers receive informational mess ages an d lower. See
Table 23-3 on pa ge 23-9 for level keywords.