When one job is spread over several services, say a backup unit, a sync unit and a cleanup unit, I want to read their logs as one story. -u per unit works, but there’s a neater way: give all of them the same journal field and filter on that.
LogExtraFields= is a unit setting that attaches extra FIELD=VALUE pairs to every log line the service produces. Journal fields are indexed, and the systemd.exec man page mentions this exact use: matching log lines across units. A drop-in per service does it:
sudo systemctl edit backup.service
[Service]
LogExtraFields=JOB=nightly-backup
sudo systemctl restart backup.service
journalctl JOB=nightly-backup
Put the same line in the drop-ins of the sync and cleanup units and journalctl JOB=nightly-backup shows the three of them together, in time order. journalctl -F JOB lists every value you’ve used so far. You can add more than one pair, separated by spaces, and quote a pair when the value has a space in it.
Pick the field name carefully: capitals, digits and underscores only, and no underscore at the start, because names that start with one are reserved for fields the journal itself fills in. The other catch: it only works for system services, not for services in your --user session, and only lines written after the restart get the field. Older entries stay as they were.
Further reading: systemd.exec(5) manual page, sd_journal_print(3) on field names