The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This chapter describes the system management commands that begin with L.
To discard the pending changes to the syslog server configuration, use the logging abort command.
logging abort
This command has no arguments or keywords.
None
Global configuration mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
This example shows how to discard the changes made to the syslog server configuration:
switch(config)# logging distribute
switch(config)# logging abort
switch(config)#
To commit the pending changes to the syslog server configuration for distribution to the switches in the fabric, use the logging commit command.
logging commit
This command has no arguments or keywords.
None
Global configuration mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
This example shows how to commit the distribution of the syslog server configuration:
switch(config)# logging distribute
switch(config)# commit
switch(config)#
|
|
---|---|
logging distribute |
Enables the distribution of the syslog server configuration to network switches using the CFS infrastructure. |
show logging status |
Displays the logging status. |
To enable logging messages to the console session, use the logging console command. To disable logging messages to the console session, use the no form of this command.
logging console [severity-level]
no logging console
None
Global configuration mode
|
|
5.2(1)N1(1) |
This command was introduced. |
This example shows how to enable logging messages with a severity level of 4 (warning) or higher to the console session:
switch# configure terminal
switch(config)# logging console 4
|
|
---|---|
show logging console |
Displays the console logging configuration. |
To enable the distribution of the syslog server configuration to network switches using the Cisco Fabric Services (CFS) infrastructure, use the logging distribute command. To disable the distribution, use the no form of this command.
logging distribute
no logging distribute
This command has no arguments or keywords.
Distribution is disabled.
Global configuration mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
This example shows how to enable the distribution of the syslog server configuration:
switch(config)# logging distribute
switch(config)#
This example shows how to disable the distribution of the syslog server configuration:
switch(config)# no logging distribute
switch(config)#
To log interface events, use the logging event command. To disable logging of interface events, use the no form of this command.
logging event port {link-status | trunk-status} {default | enable}
no logging event port {link-status | trunk-status} {default | enable}
None
Global configuration mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
This example shows how to log interface events:
switch# configure terminal
switch(config)# logging event link-status default
|
|
---|---|
show logging |
Displays the logging status. |
To log events on an interface, use the logging event port command. To disable logging of interface events, use the no form of this command.
logging event port {link-status | trunk-status} [default]
no logging event port {link-status | trunk-status}
None
Interface configuration mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
This example shows how to log interface events:
switch# configure terminal
switch(config)# interface ethernet 1/1
switch(config-if)# logging event port link-status default
|
|
---|---|
show interface |
Displays the interface configuration information. |
show logging |
Displays the logging status. |
To configure the Optimized ACL Logging (OAL) parameters, use the logging ip access-list cache command. To reset to the default settings, use the no form of this command.
logging ip access-list cache {{entries num_entries} | {interval seconds} | {threshold num_packets}}
no logging ip access-list cache {{entries num_entries} | {interval seconds} | {threshold num_packets}}
None
Global configuration
network-admin
|
|
5.2(1)N1(1) |
This command was introduced. |
This command does not require a license.
This example shows how to to specify the maximum number of log entries that are cached in the software:
switch# configure terminal
switch(config)# logging ip access-list cache entries 200
switch(config)#
This example shows how to specify the maximum time interval before an entry is sent to the system log:
switch# configure terminal
switch(config)# logging ip access-list cache interval 350
switch(config)#
This example shows how to specify the number of packet matches before an entry is sent to the system log:
switch# configure terminal
switch(config)# logging ip access-list cache threshold 125
switch(config)#
|
|
---|---|
show logging ip access-list |
Displays the status of IP access list logging. |
To enable logging messages from a defined facility that have the specified severity level or higher, use the logging level command. To disable logging messages from a defined facility, use the no form of this command.
logging level facility severity-level
no logging level facility severity-level
facility |
Facility. The facilities are listed in Table A-1 of "System Message Logging Facilities." To apply the same severity level to all facilities, use the all facility. |
severity-level |
Number of the desired severity level at which messages should be logged. Messages at or numerically lower than the specified level are logged. Severity levels are as follows: •0—emergency: System unusable •1—alert: Immediate action needed •2—critical: Critical condition—default level •3—error: Error condition •4—warning: Warning condition •5—notification: Normal but significant condition •6—informational: Informational message only •7—debugging: Appears during debugging only |
None
Global configuration mode
|
|
5.2(1)N1(1) |
This command was introduced. |
This example shows how to enable logging messages from the AAA facility that have a severity level of 2 or higher:
switch(config)# logging level aaa 2
|
|
---|---|
show logging level |
Displays the facility logging level configuration. |
To configure the name of the log file used to store system messages and the minimum severity level to log, use the logging logfile command. To disable logging to the log file, use the no form of this command.
logging logfile logfile-name severity-level [size bytes]
no logging logfile [logfile-name severity-level [size bytes]]]
None
Global configuration mode
|
|
5.2(1)N1(1) |
This command was introduced. |
This example shows how to configure a log file called logfile to store system messages and set its severity level to 4:
switch(config)# logging logfile logfile 4
|
|
---|---|
show logging logfile |
Displays the log file. |
To enable module log messages, use the logging module command. To disable module log messages, use the no form of this command.
logging module [severity-level]
no logging module
None
Global configuration mode
|
|
5.2(1)N1(1) |
This command was introduced. |
Set a specified severity level or use the default.
This example shows how to enable module log messages:
switch(config)# logging module
|
|
---|---|
show logging module |
Displays the module logging status. |
To enable the device to log messages to the monitor (terminal line), use the logging monitor command. To disable monitor log messages, use the no form of this command.
logging monitor [severity-level]
no logging monitor
None
Global configuration mode
|
|
5.2(1)N1(1) |
This command was introduced. |
This configuration applies to Telnet and Secure Shell (SSH) sessions.
This example shows how to enable monitor log messages:
switch(config)# logging monitor
|
|
---|---|
show logging monitor |
Displays the status of monitor logging. |
To configure a remote syslog server at the specified hostname or IPv4/IPv6 address, use the logging server command. To disable the remote syslog server, use the no form of this command.
logging server host [severity-level] [facility {auth | authpriv | cron | daemon | ftp | kernel | local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7 | lpr | mail | news | syslog | user | uucp}| use-vrf {vrf_name | management}]
no logging server host [severity-level] [facility {auth | authpriv | cron | daemon | ftp | kernel | local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7 | lpr | mail | news | syslog | user | uucp}| use-vrf {vrf_name | management}]
host |
Hostname or IPv4/IPv6 address of the remote syslog server. |
severity-level |
(Optional) Number of the desired severity level at which messages should be logged. Messages at or numerically lower than the specified level are logged. Severity levels are as follows: •0—emergency: System unusable •1—alert: Immediate action needed •2—critical: Critical condition—default level •3—error: Error condition •4—warning: Warning condition •5—notification: Normal but significant condition •6—informational: Informational message only •7—debugging: Appears during debugging only |
facility facility |
(Optional) Specifies the outgoing facility. The facilities are listed in Table A-1 of "System Message Logging Facilities." The default outgoing facility is local7. |
vrf vrf_name |
(Optional) Specifies the virtual routing and forwarding (VRF) to be used in the remote server. The name can be a maximum of 32 alphanumeric characters. |
management |
Specifies the management VRF. This is the default VRF. |
The default outgoing facility is local7.
The default VRF is management.
Global configuration mode
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
This example shows how to configure a remote syslog server at a specified IPv4 address, using the default outgoing facility:
switch(config)# logging server 192.168.2.253
This example shows how to configure a remote syslog server at a specified hostname with severity level 5 or higher:
switch(config)# logging server syslogA 5
|
|
---|---|
show logging server |
Displays the configured syslog servers. |
To set the logging time-stamp units, use the logging timestamp command. To reset the logging time-stamp units to the default, use the no form of this command.
logging timestamp {microseconds | milliseconds | seconds}
no logging timestamp {microseconds | milliseconds | seconds}
None
Global configuration mode
|
|
5.2(1)N1(1) |
This command was introduced. |
By default, the units are seconds.
This example shows how to set the logging time-stamp units to microseconds:
switch(config)# logging timestamp microseconds
|
|
---|---|
show logging timestamp |
Displays the logging time-stamp configuration. |