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

    // remove the color from the message
    final String plainMessage = message.replaceAll("\u001B\\[[0-9;]{1,5}m", "");
    singleThreadedExecutor.execute(() -> messageConsumer.accept(plainMessage));
  }
Creates a {@link PlainConsoleLogger}.

@param messageConsumers map from each {@link Level} to a log message {@link Consumer} of type
    {@code Consumer<String>}
@param singleThreadedExecutor a {@link SingleThreadedExecutor} to ensure that all messages are
    logged in a sequential, deterministic order
jib-plugins-common/src/main/java/com/google/cloud/tools/jib/plugins/common/logging/PlainConsoleLogger.java