SignalK / signalk-server

An implementation of a Signal K central server for boats.
http://signalk.org
Apache License 2.0
311 stars 153 forks source link

Update signalk.service to use journal logging #1814

Open Champang opened 3 hours ago

Champang commented 3 hours ago

When following the signalk service on a Raspberry, the following warning message appears:

/etc/systemd/system/signalk.service:5: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.

To solve this problem, you need to change the following lines in the file: replace syslog by journal.

sudo nano /etc/systemd/system/signalk.service

StandardOutput=syslog by StandardOutput=journal StandardError=syslog by StandardError=journal

tkurki commented 2 hours ago

How backwards compatible would this be?

Champang commented 1 hour ago

Compatibility: systemd-journald is designed to be compatible with applications that use syslog. This means that messages sent to the journal via StandardOutput=journal will be accessible in the same way as those sent to syslog.

Additional Features: By using StandardOutput=journal, you benefit from additional features offered by journald, such as structured logging, easier filtering and searching of logs, and better log management in terms of performance and storage.

Configuration: Ensure that your service is configured to use systemd and that journald is active on your system. Most modern Linux distributions use systemd by default.

Testing: Not possible for me to test for all Linux OS