Command Reference Syslog Commands
8.14 logging filter rule
Use this command to configure the filter rule of the log message,
logging filter rule { exact-match module module-name mnemonic mnemonic-name level level |
single-match [ level level | mnemonic mnemonic-name | module module-name ] }
Use this command to delete the “exact-match” filter rule.
no logging filter rule exact-match [ module module-name mnemonic mnemonic-name level
level ]
Use this command to delete the “single-match” filter rule.
no logging filter rule single-match [ level level | mnemonic mnemonic-name | module
module-name ]
Exact-match filter rule. Fill in all the following three parameters.
Single-match filter rule. Fill in one of the following three parameters.
No filter rule is configured by default,
Global configuration mode
If you want to filter a specific log message, use the “exact-match” filter rule and fill in all three
parameters, namely, module name, mnemonic name and log level.
If you want to filter a specific kind of log messages, use the “single-match” filter rule and fill in one of
three parameters, namely, module name, mnemonic name and log level.
When configured with the same module name, mnemonic name or log level, the “single-match” filter
rule has a higher priority than the “exact-match” filter rule,
The following example configures the “exact-match” filter rule with parameters of module name
LOGIN, log level 5 and mnemonic name LOGOUT.
Ruijie(config)# logging filter rule exact-match module LOGIN mnemonic LOGOUT
level 5
The following example configures the “single-match” filter rule with the parameter of module name
SYS.
Ruijie(config)# logging filter rule single-match module SYS