private static String buildLogMessage(TimerEvent timerEvent) {
    StringBuilder logMessageBuilder = getTabs(timerEvent.getTimer());

    if (timerEvent.getState() == State.START) {
      return logMessageBuilder.append("TIMING\t").append(timerEvent.getDescription()).toString();

    } else {
      return logMessageBuilder
          .append("TIMED\t")
          .append(timerEvent.getDescription())
          .append(" : ")
          .append(timerEvent.getDuration().toNanos() / 1000 / 1000.0)
          .append(" ms")
          .toString();
    }
  }
Builds the log message for a {@link TimerEvent}, based on its state and duration.

@param timerEvent the {@link TimerEvent}
@return the built log message
jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/TimerEventHandler.java