Cisco Nexus 5000 Series Switch CLI Software Configuration Guide, NX-OS 4.0(1a)N1 (OL-16597-01, January 2009)

Send feedback to nx5000-docfeedback@cisco.com
25-4
Cisco Nexus 5000 Series Switch CLI Software Configuration Guide
OL-16597-01
Chapter 25 Configuring System Message Logging
Configuring System Message Logging
The following example shows how to configure a switch to log system messages to a file:
switch# configure terminal
switch(config)# logging logfile my_log size 6
switch(config)# no logging logfile
switch(config)# show logging info
switch(config)# copy running-config startup-config
Configuring Module and Facility Messages Logged
To configure the severity level and time-stamp units of messages logged by modules and facilities,
perform this task:
Command Purpose
Step 1
switch# configure terminal
Enters configuration mode.
Step 2
switch(config)# logging logfile
logfile-name severity-level [size bytes]
Configures the name of the log file used to store
system messages and the minimum severity level to
log. You can optionally specify a maximum file size.
The default severity level is 5 and the file size is
10485760. Severity levels are listed in Table 25-1.
The file size is from 4096 to 10485760 bytes.
switch(config)# no logging logfile
[logfile-name severity-level [size
bytes]]
Disables logging to the log file.
Step 3
switch(config)# show logging info
(Optional) Displays the logging configuration.
Step 4
switch(config)# copy running-config
startup-config
(Optional) Copies the running configuration to the
startup configuration.
Command Purpose
Step 1
switch# configure terminal
Enters configuration mode.
Step 2
switch(config)# logging module
[severity-level]
Enables module log messages that have the specified
severity level or higher. Severity levels, which range
from 0 to 7, are listed in Table 25-1. If the severity
level is not specified, the default of 5 is used.
switch(config)# no logging module
[severity-level]
Disables module log messages.
Step 3
switch(config)# show logging module
(Optional) Displays the module logging
configuration.