public static void throttledLog(
      final Consumer<String> logger,
      final String logMessage,
      final AtomicBoolean shouldLog,
      final int logRepeatDelay) {
    if (shouldLog.compareAndSet(true, false)) {
      logger.accept(logMessage);

      final Runnable runnable = () -> shouldLog.set(true);
      executor.schedule(runnable, logRepeatDelay, TimeUnit.SECONDS);
    }
  }
Throttles logging to a given logger.

@param logger logger as a String consumer
@param logMessage message to log
@param shouldLog AtomicBoolean to track whether the message should be logged
@param logRepeatDelay delay in seconds between repeated logs
util/src/main/java/org/hyperledger/besu/util/log/LogUtil.java