I have simply been sticking something like this at the top of my bash scripts. This still works with systemd. (I have used it for a long time and I don't fully understand it. It just works, so I use it.)
exec 5> >(logger -t $0) BASH_XTRACEFD="5" PS4='$LINENO: ' set -x
Even with systemd, the above commands give the expected output in journalctl. However, it seems that maybe I should be using something like this instead.
systemd-cat -t $0
How should I alter my current logging commands under systemd?
(I'm looking for the same kind of simple-minded solution where I can paste a few lines and get some output in the journal.)