In rsyslog, select err plus the more severe crit, alert, and emerg messages for every facility.
Which selector is appropriate?
FACILITY.PRIORITY without an equals sign treats priority as a threshold. *.err selects err through emerg.
Detailed explanation
*.=errIncorrect. .=err selects only exact err.
Incorrect. .=err selects only exact err.
*.errCorrect. *.err includes err and more severe priorities.
Correct. *.err includes err and more severe priorities.
*.!errIncorrect. !err excludes err rather than selecting it.
Incorrect. !err excludes err rather than selecting it.
err.*Incorrect. The selector order is facility.priority.
Incorrect. The selector order is facility.priority.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' '*.err' | awk -F. '{print $1, $2}'Expected result
* errKey points
- Facility is on the left
- Priority is a threshold
- Equals means exact
Notes
- Environment: POSIX awk / 模擬selectorのみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.