L Commands
This chapter describes the system management commands that begin with L.
logging abort
To discard the pending changes to the syslog server configuration, use the logging abort command.
logging abort
Syntax Description
This command has no arguments or keywords.
Command Default
None
Command Modes
Global configuration mode
Command History
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
Examples
This example shows how to discard the changes made to the syslog server configuration:
switch(config)# logging distribute
switch(config)# logging abort
switch(config)#
Related Commands
logging commit
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
Syntax Description
This command has no arguments or keywords.
Command Default
None
Command Modes
Global configuration mode
Command History
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
Examples
This example shows how to commit the distribution of the syslog server configuration:
switch(config)# logging distribute
switch(config)# commit
switch(config)#
Related Commands
|
|
---|---|
logging distribute |
Enables the distribution of the syslog server configuration to network switches using the CFS infrastructure. |
show logging status |
Displays the logging status. |
logging console
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
Syntax Description
Command Default
None
Command Modes
Global configuration mode
Command History
|
|
5.2(1)N1(1) |
This command was introduced. |
Examples
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
Related Commands
|
|
---|---|
show logging console |
Displays the console logging configuration. |
logging distribute
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
Syntax Description
This command has no arguments or keywords.
Command Default
Distribution is disabled.
Command Modes
Global configuration mode
Command History
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
Examples
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)#
Related Commands
logging event
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}
Syntax Description
Command Default
None
Command Modes
Global configuration mode
Command History
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
Examples
This example shows how to log interface events:
switch# configure terminal
switch(config)# logging event link-status default
Related Commands
|
|
---|---|
show logging |
Displays the logging status. |
logging event port
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}
Syntax Description
Command Default
None
Command Modes
Interface configuration mode
Command History
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
Examples
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
Related Commands
|
|
---|---|
show interface |
Displays the interface configuration information. |
show logging |
Displays the logging status. |
logging ip access-list cache
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}}
Syntax Description
Defaults
None
Command Modes
Global configuration
network-admin
Command History
|
|
5.2(1)N1(1) |
This command was introduced. |
Usage Guidelines
This command does not require a license.
Examples
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)#
Related Commands
|
|
---|---|
show logging ip access-list |
Displays the status of IP access list logging. |
logging level
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
Syntax Description
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 |
Command Default
None
Command Modes
Global configuration mode
Command History
|
|
5.2(1)N1(1) |
This command was introduced. |
Examples
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
Related Commands
|
|
---|---|
show logging level |
Displays the facility logging level configuration. |
logging logfile
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]]]
Syntax Description
Command Default
None
Command Modes
Global configuration mode
Command History
|
|
5.2(1)N1(1) |
This command was introduced. |
Examples
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
Related Commands
|
|
---|---|
show logging logfile |
Displays the log file. |
logging module
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
Syntax Description
Command Default
None
Command Modes
Global configuration mode
Command History
|
|
5.2(1)N1(1) |
This command was introduced. |
Usage Guidelines
Set a specified severity level or use the default.
Examples
This example shows how to enable module log messages:
switch(config)# logging module
Related Commands
|
|
---|---|
show logging module |
Displays the module logging status. |
logging monitor
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
Syntax Description
Command Default
None
Command Modes
Global configuration mode
Command History
|
|
5.2(1)N1(1) |
This command was introduced. |
Usage Guidelines
This configuration applies to Telnet and Secure Shell (SSH) sessions.
Examples
This example shows how to enable monitor log messages:
switch(config)# logging monitor
Related Commands
|
|
---|---|
show logging monitor |
Displays the status of monitor logging. |
logging server
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}]
Syntax Description
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. |
Command Default
The default outgoing facility is local7.
The default VRF is management.
Command Modes
Global configuration mode
Command History
|
|
---|---|
5.2(1)N1(1) |
This command was introduced. |
Examples
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
Related Commands
|
|
---|---|
show logging server |
Displays the configured syslog servers. |
logging timestamp
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}
Syntax Description
Command Default
None
Command Modes
Global configuration mode
Command History
|
|
5.2(1)N1(1) |
This command was introduced. |
Usage Guidelines
By default, the units are seconds.
Examples
This example shows how to set the logging time-stamp units to microseconds:
switch(config)# logging timestamp microseconds
Related Commands
|
|
---|---|
show logging timestamp |
Displays the logging time-stamp configuration. |