Forward messages received by journald to the local syslog daemon socket.
Which journald.conf setting is appropriate?
ForwardToSyslog=yes enables forwarding from journald to the local syslog socket.
Detailed explanation
ForwardToSyslog=yesCorrect. It enables forwarding to the syslog socket.
Correct. It enables forwarding to the syslog socket.
Storage=syslogIncorrect. syslog is not a Storage value.
Incorrect. syslog is not a Storage value.
SyslogForward=persistentIncorrect. This setting name and value are not standard.
Incorrect. This setting name and value are not standard.
ForwardToConsole=syslogIncorrect. ForwardToConsole controls console forwarding and expects a boolean.
Incorrect. ForwardToConsole controls console forwarding and expects a boolean.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'ForwardToSyslog=yes' | awk -F= '{print $1, $2}'Expected result
ForwardToSyslog yesKey points
- Boolean setting
- Integrates with syslog daemon
- Understand duplicate storage
Notes
- Environment: POSIX awk / 模擬設定のみ
- 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.