Package hudson.util

Class RingBufferLogHandler

java.lang.Object
java.util.logging.Handler
hudson.util.RingBufferLogHandler

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

    • RingBufferLogHandler

      @Deprecated public RingBufferLogHandler()
      Deprecated.
      This constructor is deprecated. It can't access system properties with SystemProperties as it's not legal to use it on remoting agents.
    • RingBufferLogHandler

      public RingBufferLogHandler(int ringSize)
  • Method Details

    • getDefaultRingBufferSize

      public static int getDefaultRingBufferSize()
      Returns:
      int DEFAULT_RING_BUFFER_SIZE
      Since:
      2.259
      See Also:
    • publish

      public void publish(LogRecord record)
      Specified by:
      publish in class Handler
    • 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
    • close

      public void close() throws SecurityException
      Specified by:
      close in class Handler
      Throws:
      SecurityException