Log uncaught exceptions as errors

Currently uncaught exceptions are logged at trace level, but they are errors and should be logged as such.