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-3
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 messages:
switch# configure terminal
switch(config)# logging console 3
switch(config)# no logging console
switch(config)# show logging console
switch(config)# logging monitor 3
switch(config)# no logging monitor
switch(config)# show logging monitor
switch(config)# copy running-config startup-config
Configuring System Message Logging to a File
You can configure the switch to log system messages to a file. By default, system messages are logged
to the file log:messages.
For information about displaying and clearing log files, see the “Displaying and Clearing Log Files”
section on page 25-8.
To configure the switch to log system messages to a file, perform this task:
Command Purpose
Step 1
switch# configure terminal
Enters configuration mode.
Step 2
switch(config)# logging console
[severity-level]
Enables the switch to log messages to the console
session based on a specified severity level or higher.
Severity levels, which can range from 0 to 7, are listed
in Table 25-1. If the severity level is not specified, the
default of 2 is used.
switch(config)# no logging console
[severity-level]
Disables the switch’s ability to log messages to the
console.
Step 3
switch(config)# show logging console
(Optional) Displays the console logging
configuration.
Step 4
switch(config)# logging monitor
[severity-level]
Enables the switch to log messages to the monitor
based on a specified severity level or higher. The
configuration applies to Telnet and SSH sessions.
Severity levels, which can range from 0 to 7, are listed
in Table 25-1. If the severity level is not specified, the
default of 2 is used.
switch(config)# no logging monitor
[severity-level]
Disables logging messages to telnet and SSH
sessions.
Step 5
switch(config)# show logging monitor
(Optional) Displays the monitor logging
configuration.
Step 6
switch(config)# copy running-config
startup-config
(Optional) Copies the running configuration to the
startup configuration.