As far as I can tell, Syncthing does not have an option for where it writs its logs (it just spews them to standard output and standard error). Since I run it through systemd, I can edit /etc/systemd/system/multi-user.target.wants/syncthing@myusername to add
but that file is a symlink to /lib/systemd/system/syncthing@.service, which gets wiped without notice every time the syncthing package updates. I’ve read there’s an oddity in systemd in which these files must be symlinks, but even if that wasn’t the case, if I detach it, I won’t benefit from changes to the defaults as they come in (I tested this; apt did not warn me before overwriting the file, which makes sense since configuration files should not exist in /lib).
Is there a way to specify a log file or do I need to create a feature request? Alternatively, is there a way to specify additional configurations in systemd that is additive to that symlink?
If I remember correctly, with the standard service files for systemd distributed with Syncthing, the output should be going to the journal. Check out the journalctl command to work with that.
Please check https://docs.syncthing.net/users/syncthing.html#cmdoption-logfile if you want to do it via Syncthing itself. There is also the undocumented --logfile=default switch, which saves the logfile in the Syncthing’s home folder, rotating between four files.
Okay, I have combined the answers from @acolomb & @tomasz86 to create an override by running sudo systemctl edit syncthing@adamhotep.service and adding this stanza:
This appears to work. I had to guess that the units were bytes. However, it does now need root privileges to run (though it does still properly propagate files as my user).