Script action for Errors and exceptions

Is there a way to read logged errors and exceptions in a script in openHAB version 2.2 or 2.3-SNAPSHOT? I would like to get notified via xmpp about these events.

Would this help you: LogReader binding?

This looks good, yes. Thanks for the pointer.