You can use the following command to watch log output from services that are running through systemd and logging to the journal. You would typically start a systemd service with a command like service example start
.
Here’s the command to show recent log output and then continue following (-f) that output.
journalctl -f
I use this to see the debug logs from my Caddy Web Server, amoung other things.
It may also be useful to press Command-K on Mac to clear the terminal window.
Written by Joel Dare on October 18, 2022.
Get battle-tested dev tips, terminal wizardry, and practical Mac hacks from a veteran engineer who speaks your language. Subscribe now and power up your toolkit—no fluff, just real code magic.
JoelDare.com © Dare Companies Dotcom LLC