Log
show logging-file
Command Objective: This command displays the priority and file name of all the three files configured in the syslog file table.
Syntax: show logging-file
Mode: Privileged EXEC Mode.
show logging-server
Command Objective: This command displays the information about the syslog logging server table.
Syntax: show logging-server
Mode: Privileged EXEC Mode.
show logging
Command Objective: This command displays all the logging status and configuration information.
Syntax: show logging
Mode: Privileged EXEC Mode.
logging
Command Objective: This command enables syslog server and configures the syslog ]{.s16}[related parameters The logging process controls the distribution of logging messages to the various destinations.
Syntax:
logging {[facility {local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7}] | [severity {alerts | critical | debugging | emergencies | errors | informational | notification | warnings }]}
logging {buffered [<short (1-200)>]}
Parameter Description:
- facility: The facility that is indicated in the message. Can be one of the following values: local0, local1, local2, local3, local4, local5, local 6, local7.
-
severity: Message severity level. Messages with severity level equal to or high than the specified value are printed asynchronously. This can be configured using numerical value or using the available option. The options are:]{style=" color: #000;"}
- 0 | emergencies: System is unusable.
- 1 | alerts: Immediate action needed.
- 2 | critical: Critical conditions.
- 3 | errors: Error conditions.
- 4 | warnings: Warning conditions.
- 5 | notification: Normal but significant conditions.
- 6 | informational: Informational messages.
- 7 | debugging: Debugging messages.
-
buffered: Limits Syslog messages displayed from an internal buffer. This size ranges between 1 and 200 entries.
Mode: Global Configuration Mode.
logging-service
Command Objective: This command enables/disables syslog server.
Syntax: logging-service {enable | disable}
Parameter Description:
- enable: Syslog enabled.
- disable: Syslog disabled.
Mode: Global Configuration Mode.
clear logs
Command Objective: This command clears the system syslog buffers.
Syntax: clear logs
Mode: Global Configuration Mode.
syslog filename-one
Command Objective: This command configures a first file to store the syslog messages locally. The maximum size of the file name is 32.
Syntax: syslog filename-one <string(32)>
Mode: Global Configuration Mode.
logging-file
Command Objective: This command adds an entry which is flash_log in the file table.
Syntax: logging-file <short(0-191)> flash_log
Parameter Description:
- <short(0-191)>: Sets the priority of syslog messages. 0-lowest priority, 191-highest priority.
Mode: Global Configuration Mode.
logging-server
Command Objective: This command configures a server table to log an entry in it.
The no form of command deletes an entry from the server table.
Syntax:
logging-server {facility {local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7}} {severity {emergencies | alerts | critical | errors | warnings | notification | informational| debugging}} {ipv4<ucast_addr> |ipv6 <ip6_addr> | <string>} [ port <integer(0-65535)>]
no logging-server {facility {local0 | local1 | local2 | local3 | local4 | local5 | local6 | local7}} {severity {emergencies | alerts | critical | errors | warnings | notification | informational | debugging}} {ipv4 <ucast_addr> |ipv6 <ip6_addr> | <string>
Parameter Description:
- facility: The facility that is indicated in the message. Can be one of the following values: local0, local1, local2, local3, local4, local5, local 6, local7.
-
severity: Message severity level. Messages with severity level equal to or high than the specified value are printed asynchronously. This can be configured using numerical value or using the available option. The options are:
- 0 | emergencies: System is unusable.
- 1 | alerts: Immediate action needed.
- 2 | critical: Critical conditions.
- 3 | errors: Error conditions.
- 4 | warnings: Warning conditions.
- 5 | notification: Normal but significant conditions.
- 6 | informational: Informational messages.
- 7 | debugging: Debugging messages.
-
ipv4 <ucast_addr>: Sets the server address type as internet protocol version 4.
- ipv6 <ip6_addr>: Sets the server address type as internet protocol version 6.
- <string>: Configures the host name for a server to log an entry.
- port <integer(0-65535)>: Sets the port number through which it sends the syslog message. The value ranges between 0 and 65535.
Mode: Global Configuration Mode.