Include thread duration when logging an exception.