Configuration Guide Configuring Syslog
7.4.7 Configuring Syslog Filtering
Configuration Effect
Filter out a specified type of syslogs if the administrator does not want to display these syslogs.
By default, logs generated by all modules are displayed on the Console or other terminals. You can configure log
filtering rules to display only desired logs.
Notes
Two filtering modes are available: contains-only and filter-only. You can configure only one filtering mode at a time.
If the same module, level, or mnemonic is configured in both the single-match and exact-match rules, the single-match
rule prevails over the exact-match rule.
Configuration Steps
Configuring the Log Filtering Direction
(Optional) By default, the filtering direction is all, that is, all logs are filtered out.
Unless otherwise specified, perform this configuration on the device to configure the log filtering direction.
Configuring the Log Filtering Mode
(Optional) By default, the log filtering mode is filter-only.
Unless otherwise specified, perform this configuration on the device to configure the log filtering mode.
Configuring the Log Filtering Rule
(Mandatory) By default, no filtering rule is configured.
Unless otherwise specified, perform this configuration on the device to configure the log filtering rule.
Verification
Run the show running command to display the configuration.
Related Commands
Configuring the Log Filtering Direction
logging filter direction { all | buffer | file | server | terminal }
all: Filters out all logs.
buffer: Filters out logs sent to the log buffer, that is, the logs displayed by the show logging command.
file: Filters out logs written into log files.
server: Filters out logs sent to the log server.
terminal: Filters out logs sent to the Console and VTY terminal (including Telnet and SSH).
Global configuration mode