[FIXED JENKINS-10547] Don't fail fatally when unable to log event

Instead, handle the exception and write it to the `wrapper.log` so users have a way to learn what's going on.