This section describes the commands you use to configure system logging, and to view logs and the logging settings.
logging buffered
This command enables logging to an in-memory log that keeps up to 128 logs.
Default: disabled; critical when enabled
Format: logging buffered
Mode: Global Config
no logging buffered
This command disables logging to in-memory log.
Format: no logging buffered
Mode: Global Config
logging buffered wrap
This command enables wrapping of in-memory logging when the log file reaches full capacity. Otherwise when the log file reaches full capacity, logging stops.
Default: enabled
Format: logging buffered wrap
Mode: Privileged EXEC
no logging buffered wrap
This command disables wrapping of in-memory logging and configures logging to stop when the log file capacity is full.
Format: no logging buffered wrap
Mode: Privileged EXEC
logging cli-command
This command enables the CLI command logging feature, which enables the software to log all CLI commands issued on the system.
Default: enabled
Format: logging cli-command
Mode: Global Config
no logging cli-command
This command disables the CLI command Logging feature.
Format: no logging cli-command
Mode: Global Config
logging console
This command enables logging to the console. You can specify the <severitylevel> value as either an integer from 0 to 7 or symbolically through one of the following keywords: emergency (0), alert (1), critical (2), error (3), warning (4), notice (5), info (6), or debug (7).
Default: disabled; critical when enabled
Format: logging console [severitylevel]
Mode: Global Config
no logging console
This command disables logging to the console.
Format: no logging console
Mode: Global Config
logging host
This command enables logging to a host. You can configure up to eight hosts. The <ipaddr> is the IP address of the logging host. The <port> value is a port number from 1 to 65535. You can specify the <severitylevel> value as either an integer from 0 to 7 or symbolically through one of the following keywords: emergency (0), alert (1), critical (2), error (3), warning (4), notice (5), info (6), or debug (7).
This command enables logging host reconfiguration.
Format: logging host reconfigure <hostindex>
Mode: Global Config
hostindex: Enter the Logging Host Index for which to change the IP address.
logging host remove
This command disables logging to host.
Format: logging host remove <hostindex>
Mode: Global Config
logging syslog
This command enables syslog logging. The <portid> parameter is an integer with a range of 1-65535.
Default: disabled
Format: logging syslog [port <portid>]
Mode: Global Config
no logging syslog
This command disables syslog logging.
Format: no logging syslog
Mode: Global
show logging
This command displays logging configuration information.
Format: show logging
Mode: Privileged EXEC
The display parameters for above command are:
Logging Client Local Port: Port on the collector/relay to which syslog messages are sent.
CLI Command Logging: Shows whether CLI Command logging is enabled.
Console Logging: Shows whether console logging is enabled.
Console Logging Severity Filter: The minimum severity to log to the console log. Messages with an equal or lower numerical severity are logged.
Buffered Logging: Shows whether buffered logging is enabled.
Syslog Logging: Shows whether syslog logging is enabled.
Log Messages Received: Number of messages received by the log process. This includes messages that are dropped or ignored.
Log Messages Dropped: Number of messages that could not be processed due to error or lack of resources.
Log Messages Relayed: Number of messages sent to the collector/relay.
show logging buffered
This command displays buffered logging (system startup and system operation logs).
Format: show logging buffered
Mode: Privileged EXEC
The display parameters for above command are:
Buffered (In-Memory) Logging: Shows whether the In-Memory log is enabled or disabled.
Buffered Logging Wrapping Behavior: The behavior of the In Memory log when faced with a log full situation.
Buffered Log Count: The count of valid entries in the buffered log.
show logging hosts
This command displays all configured logging hosts.
Format: show logging hosts
Mode: Privileged EXEC
The display parameters for above command are:
Host Index: (Used for deleting hosts)
IP Address: IP address of the logging host.
Severity Level: The minimum severity to log to the specified address. The possible values are emergency (0), alert (1), critical (2), error (3), warning (4), notice (5), info (6), or debug (7).
Port: The server port number, which is the port on the local host from which syslog messages are sent.
Host Status: The state of logging to configured syslog hosts. If the status is disable, no logging occurs.
show logging persistent
Use the show logging persistent command to display persistent log entries.
Format: show logging persistent
Mode: Privileged EXEC
The display parameters for above command are:
Persistent Log Count: The number of persistent log entries.
show logging traplogs
This command displays SNMP trap events and statistics.
Format: show logging traplogs
Mode: Privileged EXEC
The display parameters for above command are:
Number of Traps Since Last Reset: The number of traps since the last boot.
Trap Log Capacity: The number of traps the system can retain.
Number of Traps Since Log Last Viewed: The number of new traps since the command was last executed.
Log: The log number.
System Time Up: How long the system had been running at the time the trap was sent.