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.
Storage=syslogIncorrect. syslog is not a Storage value.
SyslogForward=persistentIncorrect. This setting name and value are not standard.
ForwardToConsole=syslogIncorrect. 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
Syslog facility and priority
Metadata that classifies a message source and its severity.
Journal persistence
Whether systemd journal data survives a reboot and where it is stored.
Log rotation
A process that retains, renames, compresses, or removes log generations.