ExceptionHandler: disable logging unless in debug mode