This topic describes how to use CLI commands to specify the minimum severity level of log messages sent to syslog servers. For a full list of logging commands and the usage and parameters, see the CLI Command Reference.
Admin access
Go to CLI configuration mode:
hostname > enable hostname # configure terminal
To specify the minimum severity level of messages sent to syslog servers, use the
logging trap <severity>command, where<severity>is one of the following:none—Disables logging.
emerg—System failure.
alert—Immediate action required.
crit—Critical condition.
err—Error condition.
warning—Warning condition.
notice—Normal but significant condition.
info—Informational message.
debug—Debug-level message.
The following example specifies that all log messages of error level or higher severity are sent to the syslog server:
hostname (config) # logging trap err
Verify your changes:
hostname (config) # show logging Local logging level: notice Override for class mgmt-back: notice Override for class mgmt-front: notice
Remote syslog default level: err Remote syslog servers: 10.10.20.62err protocol: udp port: 514 [ . . . ]
Save your changes.
hostname (config) # write memory