Configuring The Unix System Logging Facility - Cisco Catalyst 4500 Series Configuration Manual

Release ios xe 3.3.0sg and ios 15.1(1)sg
Hide thumbs Also See for Catalyst 4500 Series:
Table of Contents

Advertisement

Chapter 58
Configuring System Message Logging
Log in as root, and perform these steps:
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
information on the facilities. The debug keyword specifies the syslog level; see
for information on the severity levels. The syslog daemon sends messages 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.
Create the log file by entering these commands at the UNIX shell prompt:
Step 2
$ touch /var/log/cisco.log
$ chmod 666 /var/log/cisco.log
Step 3
Ensure that the syslog daemon reads the new changes:
$ kill -HUP `cat /etc/syslog.pid`
For more information, see the man syslog.conf and man syslogd commands on your UNIX system.

Configuring the UNIX System Logging Facility

When sending system log messages to an external device, you can cause the switch to identify its
messages as originating from any of the UNIX syslog facilities.
To configure UNIX system facility message logging, perform this task (which is optional):
Command
Step 1
Switch# configure terminal
Step 2
Switch(config)# logging host
Step 3
Switch(config)# logging trap level
Step 4
Switch(config)# logging facility facility-type
Step 5
Switch(config)# end
Step 6
Switch# show running-config
Step 7
Switch# copy running-config startup-config
OL-25340-01
Purpose
Enters global configuration mode.
Logs 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 command more than once.
Limits messages logged to the syslog servers.
Be default, syslog servers receive informational
messages and lower. See
level keywords.
Configures the syslog facility. See
page 58-12
The default is local7.
Returns to privileged EXEC mode.
Verifies your entries.
(Optional) Saves your entries in the configuration file.
Software Configuration Guide—Release IOS XE 3.3.0SG and IOS 15.1(1)SG
Configuring System Message Logging
Table 58-4 on page 58-12
Table 58-3 on page 58-9
Table 58-3 on page 58-9
Table 58-4 on
for facility-type keywords.
for
for
58-11

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents