logging trap

Prev Next

To set the minimum severity of log messages sent to syslog servers, use the logging trap command in configuration mode. This sets both the default severity for new servers, as well as the severity for all existing servers.

Syntax

logging trap severity_level

[no] logging trap

Parameters

no

The no form of the command sets the level to “none,” which disables logging to remote servers (the list of servers is not removed).

severity_level

Default minimum severity level of all log messages saved in the log files on the local disk. The selected severity level includes all messages with a higher severity. The severity levels are:

  • none—Disables logging.

  • emerg—System failure.

  • alert—Immediate action required.

  • crit—Critical condition.

  • err—Error condition.

  • warning—Warning of possible problem.

  • notice—Significant, but normal event (the default).

  • info—Information only.

  • debug—Debugging information.

Example

The following example sets the minimum severity level for all configured syslog servers.

hostname (config) # logging trap alert

User role

Admin