Package hudson.util

Class RingBufferLogHandler


  • public class RingBufferLogHandler
    extends Handler
    Log Handler that stores the log records into a ring buffer.
    Author:
    Kohsuke Kawaguchi
    • Constructor Detail

      • RingBufferLogHandler

        public RingBufferLogHandler​(int ringSize)
    • Method Detail

      • getDefaultRingBufferSize

        public static int getDefaultRingBufferSize()
        Returns:
        int DEFAULT_RING_BUFFER_SIZE
        Since:
        2.259
        See Also:
        JENKINS-50669
      • clear

        public void clear()
      • getView

        public List<LogRecord> getView()
        Returns the list view of LogRecords in the ring buffer.

        New records are always placed early in the list.

      • flush

        public void flush()
        Specified by:
        flush in class Handler