Syncthing logging to custom logfile and syslog

I am running Syncthing v1.0.1 “Erbium Earthworm” on Ubuntu 18.04.1. I noticed that syncthing is logging to both syslog and /var/log/syncthing.log. I am confused as to why it’s doing this, though. I suspect systemd, but I thought the following systemd service config would log to the specified file only:

[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Documentation=man:syncthing(1)
After=network.target
Wants=syncthing-inotify@.service

[Service]
User=%i
ExecStart=/usr/bin/syncthing -no-browser -logfile /var/log/syncthing.log
Restart=on-failure
StandardOutput=/var/log/syncthing.log
StandardError=/var/log/syncthing.log
SuccessExitStatus=3 4
RestartForceExitStatus=3 4

[Install]
WantedBy=multi-user.target

I have several Linux machines, but this is the only one with systemd, and the only one with this issue, so I have nothing to compare it against. Any suggestions are appreciated.

Either remove the logfile command (and io redirects) to get logs to syslog, or somehow configure systemd to discard the stdout/err for the process.

Apparently, the solution was to reboot the server. After rebooting, syncthing is now logging to /var/log/syncthing.log as specified. Evidently, just restarting systemctl was not sufficient.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.