Class LoggingIterator<T>

  • All Implemented Interfaces:
    Iterator<T>

    public class LoggingIterator<T>
    extends Object
    implements Iterator<T>
    An iterator that wraps another one, but adds some logging.

    Once in every 'interval' an element is logged.

    Since:
    3.1
    Author:
    Michiel Meeuwissen
    • Constructor Detail

      • LoggingIterator

        public LoggingIterator​(Iterator<T> wrapped,
                               org.slf4j.Logger logger,
                               org.slf4j.event.Level level,
                               int interval)
      • LoggingIterator

        public LoggingIterator​(Iterator<T> wrapped,
                               org.slf4j.Logger logger,
                               int interval)