Syncthing is awesome, I love it!
However, I recently discovered that it outputs a log to syslog. I’d like to stop that.
I use the following repository in Ubuntu 16.04
https://apt.syncthing.net/ syncthing stable
Thus the systemd service file looks like this:
Description=Syncthing - Open Source Continuous File Synchronization for %I
ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0
I can not use the -logfile command line option, as it can not be used with -no-restart.
I dont care if the logging output goes to a different file or to no file at all. As I understand, it is in the system journal in any case. I just dont wont it in syslog.
Anyone who can help?
Logging goes via systemd in this setup so you want to figure out how to disable logging or syslog forwarding for a specific program in systemd. I think systemd by default logs to syslog in Ubuntu for compatibility.
In the system systemd config there is
DefaultStandardOutput if its value is
syslog you can just override that for syncthing by adding these lines to the service section:
However on debian this works different:
journal but nevertheless systemd sends everything to /run/systemd/journal/syslog where rsyslogd apparently also reads from without any configuration. That’s how I get stuff into both syslog and journal. If that’s the case you can either use filtering rules on the syslog side or set the syncthing service to log to a file, e.g. (systemd will not do any log rotation)
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.