Class ShortTermMemoryHandler
- java.lang.Object
-
- java.util.logging.Handler
-
- org.openqa.selenium.remote.server.log.ShortTermMemoryHandler
-
public class ShortTermMemoryHandler extends java.util.logging.HandlerRestishHandler who keeps in memory the last N records as is so that then can be retrieved "as is" on demand.
-
-
Constructor Summary
Constructors Constructor Description ShortTermMemoryHandler(int capacity, java.util.logging.Level minimumLevel, java.util.logging.Formatter formatter)New handler keeping track of the last N records above a specific log level.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()java.lang.StringformattedRecords()voidpublish(java.util.logging.LogRecord record)java.util.logging.LogRecord[]records()
-
-
-
Constructor Detail
-
ShortTermMemoryHandler
public ShortTermMemoryHandler(int capacity, java.util.logging.Level minimumLevel, java.util.logging.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- Formatter to use when retrieving log messages.
-
-
Method Detail
-
publish
public void publish(java.util.logging.LogRecord record)
- Specified by:
publishin classjava.util.logging.Handler
-
flush
public void flush()
- Specified by:
flushin classjava.util.logging.Handler
-
close
public void close() throws java.lang.SecurityException- Specified by:
closein classjava.util.logging.Handler- Throws:
java.lang.SecurityException
-
records
public java.util.logging.LogRecord[] records()
-
formattedRecords
public java.lang.String formattedRecords()
-
-