How to monitor JournalD for Error/Fatal error messages of some particular process and start some callback if any. Say if some service - say Nginx posts a log with Error - some script would call. How to make such a script?
You have to use journalctl --unit darts-game-server.service --follow -o json
stream and parse the output in your code. There are libs for that as well.