You could use:
journalctl -u service-name -f
Show only the most recent journal entries, and continuously print new entries as they are appended to the journal.
Here I’ve added “service-name” to distinguish this answer from others; you substitute the actual service name instead of the text
You could forward your log entries to journal:
systemd-cat tail -f /tmp/myapp.log /var/log/postgresql.log
and then use
journalctl -f… though as Mark mentioned, that will print all journal entries.
One way to filter only the messages from those logs and from that particular unit is to use a distinct
SYSLOG_IDENTIFIER i.e. edit the unit file and under the
[Service] section add e.g.
restart the unit then run
systemd-cat with the same identifier
systemd-cat -t my_stuff tail -f /tmp/myapp.log /var/log/postgresql.log
and finally query the journal only for that particular identifier:
journalctl -f -t my_stuff
If you have bash available, you can use process substitution as one of the
tail -f /tmp/myapp.log /var/log/postgresql/postgresql.main.log <(journalctl -f)