hudson.util
Class RingBufferLogHandler

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

public class RingBufferLogHandler
extends Handler

Log Handler that stores the log records into a ring buffer.

Author:
Kohsuke Kawaguchi

Constructor Summary
RingBufferLogHandler()
           
RingBufferLogHandler(int ringSize)
           
 
Method Summary
 void close()
           
 void flush()
           
 List<LogRecord> getView()
          Returns the list view of LogRecords in the ring buffer.
 void publish(LogRecord record)
           
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RingBufferLogHandler

public RingBufferLogHandler()

RingBufferLogHandler

public RingBufferLogHandler(int ringSize)
Method Detail

publish

public void publish(LogRecord record)
Specified by:
publish in class Handler

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


Copyright © 2004-2013. All Rights Reserved.