public static void ensureAndLog(
    @NotNull Class<?> loggingClass,
    boolean statement,
    @NotNull String message,
    Attachment @NotNull ... attachments
  ) {
    if (!statement) {
      Logger.getInstance(loggingClass).error(message, new IllegalPostconditionException(message), attachments);
    }
  }
public static void ensureAndLog(
    @NotNull Class<?> loggingClass,
    boolean statement,
    @NotNull String message,
    Attachment @NotNull ... attachments
  )