code: public void log(Logger logger, Object operation) {
  
      if (!isCompleted()) {
        failIfNotSucceeded();
      }
      if (isFailure()) {
        logger.warn("Operation {} failed after duration of {}", operation, getDurationAsString());
      } else {
        logger.info("Operation {} succeeded after duration of {}", operation, getDurationAsString());
      }
    }
docs: Calls {@link #failIfNotSucceeded()} and the logs the status and {@link #getDurationAsString() duration} of this
  measure.
  
  @param logger is the {@link Logger}.
  @param operation represents the operation that was measured. Typically a {@link String}. Its
  {@link Object#toString() string representation} is logged and shall be a brief description of the measured
  operation.