public class XdevMemoryHandler extends Handler
The XdevMemoryHandler
supports following properties, which must be
set in the System
properties. To change the properties in
Runtime in a type-safe manner you may use the IntegerSystemProperty
reference hold by SYSTEM_PROPERTY_STORAGE_SIZE
.
Name | Type | Description |
---|---|---|
xdev.util.logging.xdevmemoryhandler.storageSize | int |
The xdev.util.logging.xdevmemoryhandler.storageSize System
property can be used to specify the storage size for the
XdevMemoryHandler . The XdevMemoryHandler holds on to a
maximum of log records specified by this property. If the maximum is reached
earlier log records will be discarded. |
IntegerSystemProperty
Modifier and Type | Field and Description |
---|---|
static IntegerSystemProperty |
SYSTEM_PROPERTY_STORAGE_SIZE
The
xdev.util.logging.xdevhandler.storageSize System
property can be used to specify the storage size for the
XdevMemoryHandler . |
Constructor and Description |
---|
XdevMemoryHandler()
Creates a new
XdevMemoryHandler instance. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush()
This class does not support the concept of flush.
|
LogRecord |
getRecord(int index)
Returns the reference to the log record specified by
index . |
int |
getRecordCount()
Returns the count of the records currently stored by this
XdevMemoryHandler . |
List<LogRecord> |
getRecords()
|
void |
publish(LogRecord record) |
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
public static final IntegerSystemProperty SYSTEM_PROPERTY_STORAGE_SIZE
xdev.util.logging.xdevhandler.storageSize
System
property can be used to specify the storage size for the
XdevMemoryHandler
. The XdevMemoryHandler
holds on to a
maximum of log records specified by this property. If the maximum is
reached earlier log records will be discarded.public XdevMemoryHandler()
XdevMemoryHandler
instance.public void flush()
flush
in class Handler
getRecords()
public List<LogRecord> getRecords()
List
(defensive copy) of the LogRecord
s held by
this XdevMemoryHandler
instance.public int getRecordCount()
XdevMemoryHandler
.XdevMemoryHandler
.public LogRecord getRecord(int index)
index
.index
- of the log record to return.index
.public void close() throws SecurityException
close
in class Handler
SecurityException
Copyright © 2003–2021 XDEV Software. All rights reserved.