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.
SyslogIdentifier=my_stuff
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
pgpool.service
, tryjournalctl -fu pgpool.service
. Also, if you are not running this as root, make sure the user is in thesystemd-journal
group! – Mark Stosberg Oct 10 '16 at 13:50