Send deploy-done with facility local0 and priority notice.
Which command is appropriate?
logger -p FACILITY.PRIORITY selects the syslog facility and severity.
Detailed explanation
logger -t local0.notice deploy-doneIncorrect. -t sets a tag, not facility.priority.
Incorrect. -t sets a tag, not facility.priority.
logger -f local0.notice deploy-doneIncorrect. -f specifies an input file.
Incorrect. -f specifies an input file.
logger -p local0.notice deploy-doneCorrect. -p local0.notice selects the requested fields.
Correct. -p local0.notice selects the requested fields.
logger -s local0.notice deploy-doneIncorrect. -s duplicates output to stderr.
Incorrect. -s duplicates output to stderr.
Try it yourself
An example you can run in a temporary verification environment.
logger --help | grep -E -- '-p,|--priority'Expected result
priorityを指定するhelp行Key points
- -p selects priority
- local0 is a facility
- notice is a severity
Notes
- Environment: util-linux logger help / ログ送信なし
- 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.