code: public synchronized Cache<K, V> logEveryNSeconds(int seconds, final ILogger logger) {
      if (_loggingTask == null) {
        ScheduledExecutorService service = Executors.newScheduledThreadPool(1);
        _loggingTask = service.scheduleAtFixedRate(new Runnable() {
          public void run() {
            logger.info(Cache.this);
          }
        }, seconds, seconds, TimeUnit.SECONDS);
      } else {
        throw new IllegalStateException("Logging for " + this + " is already enabled");
      }
      return this;
    }
docs: Sets up a recurring task every n seconds to report on the status of this cache.  This can be useful
  if you are doing exploratory caching and wish to monitor the performance of this cache with minimal fuss.
  Consider
  @param seconds how often to log the entry
  @param logger the logger to use
  @return this