org.openqa.selenium.server.log
Class ShortTermMemoryHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by org.openqa.selenium.server.log.ShortTermMemoryHandler

public class ShortTermMemoryHandler
extends Handler

Handler who keeps in memory the last N records as is so that then can be retrieved "as is" on demand.


Constructor Summary
ShortTermMemoryHandler(int capacity, Level minimumLevel, Formatter formatter)
          New handler keeping track of the last N records above a specific log level.
 
Method Summary
 void close()
           
 void flush()
           
 String formattedRecords()
           
 void publish(LogRecord record)
           
 LogRecord[] records()
           
 
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

ShortTermMemoryHandler

public ShortTermMemoryHandler(int capacity,
                              Level minimumLevel,
                              Formatter formatter)
New handler keeping track of the last N records above a specific log level.

Parameters:
capacity - Maximum number of records to keep in memory (i.e. N).
minimumLevel - Only keep track of records whose level is equal or greater than minimumLevel.
formatter - Formmatter to use when retrieving log messages.
Method Detail

publish

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

flush

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

close

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

records

public LogRecord[] records()

formattedRecords

public String formattedRecords()


Copyright © 2012. All Rights Reserved.