I have several systemd services defined. They log both to disk and also to the systemd journal, which I can monitor using journalctl -n 0 -fu myservice
. However, I notice that the logs that I see from the journalctl tail command are often several minutes behind the disk logs. I've confirmed that this is not related to the actual logging configuration used by the daemon, as when I run the daemon manually and it's outputting its logs to standard output on a console, I see the logs immediately.
How can I see log output from journalctl immediately as the service generates it? Either completely unbuffered, or line buffered would be acceptable.