How to get see error message in journald

systemdsystemd-journald

I've created a program that intentionally has an divide by zero error.

If I run it in the command line it returns:
"Floating point exception"

But if I run this as a systemd service I can not see this error message.
In my systemd script I have added:
StandardError=journal

But the error message is nowhere to be seen when using journalctl. How can this error message be added to log seen using journalctl?

Best Answer

To get all errors for running services using journalctl:

$ journalctl -p 3 -xb

where -p 3 means priority err, -x provides extra message information, and -b means since last boot

Related Question