static void logError(String message, Throwable e, boolean wrapIntoThrowable) {
    logIfNeeded(e, wrapIntoThrowable, t -> LOG.error(message, t));
  }
static void logError(String message, Throwable e, boolean wrapIntoThrowable)