class AnsiLoggerWithFooter implements ConsoleLogger {

  @Override
  public void log(Level logLevel, String message) {
    if (!messageConsumers.containsKey(logLevel)) {
      return;
    }
    Consumer<String> messageConsumer = messageConsumers.get(logLevel);

    singleThreadedExecutor.execute(
        () -> {
          boolean didErase = eraseFooter();
          // If a previous footer was erased, the message needs to go up a line.
          if (didErase) {
            if (enableTwoCursorUpJump) {
              messageConsumer.accept(String.format(CURSOR_UP_SEQUENCE_TEMPLATE, 2));
              messageConsumer.accept(message);
            } else {
              messageConsumer.accept(CURSOR_UP_SEQUENCE + message);
            }
          } else {
            messageConsumer.accept(message);
          }

          printInBold(footerLines);
        });
  }

    AnsiLoggerWithFooter(
      ImmutableMap<Level, Consumer<String>> messageConsumers,
      SingleThreadedExecutor singleThreadedExecutor,
      boolean enableTwoCursorUpJump);

}