Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.openqa.selenium.server.log
Class ShortTermMemoryHandler

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

    public class ShortTermMemoryHandler

extends java.util.logging.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, 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
`void` | `close()`
`void` | `flush()`
`java.lang.String` | `formattedRecords()`
`void` | `publish(java.util.logging.LogRecord record)`
`java.util.logging.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,
                                  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` - Formmatter to use when retrieving log messages.

Method Detail

### publish

    public void publish(java.util.logging.LogRecord record)

  Specified by:
    `publish` in class `java.util.logging.Handler`

### flush

    public void flush()

  Specified by:
    `flush` in class `java.util.logging.Handler`

### close

    public void close()
               throws java.lang.SecurityException

  Specified by:
    `close` in class `java.util.logging.Handler`
  Throws:
    `java.lang.SecurityException`

### records

    public java.util.logging.LogRecord[] records()

### formattedRecords

    public java.lang.String formattedRecords()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009. All Rights Reserved.