public class MemoryAppender
extends org.apache.log4j.AppenderSkeleton
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Constructor and Description |
---|
MemoryAppender() |
Modifier and Type | Method and Description |
---|---|
protected void |
append(org.apache.log4j.spi.LoggingEvent event) |
void |
clear() |
void |
close() |
java.util.List<org.apache.log4j.spi.LoggingEvent> |
getEvents()
Retrieves the entire list of events
|
java.util.List<org.apache.log4j.spi.LoggingEvent> |
getEvents(int limit,
java.lang.String logNameMatch,
org.apache.log4j.Level minSeverity)
Retrieves the most recent events with the given filtering arguments applied.
|
int |
getSize() |
boolean |
requiresLayout() |
void |
resize(int newSize) |
public static final java.lang.String NAME
protected void append(org.apache.log4j.spi.LoggingEvent event)
append
in class org.apache.log4j.AppenderSkeleton
public java.util.List<org.apache.log4j.spi.LoggingEvent> getEvents()
public java.util.List<org.apache.log4j.spi.LoggingEvent> getEvents(int limit, java.lang.String logNameMatch, org.apache.log4j.Level minSeverity)
limit
- Up to this many events will be returned.logNameMatch
- if non-null/non-empty, the event's logger name must contain this text (case insensitive) in order to
match.minSeverity
- Only events with the given severity level or greater will be returned.public void resize(int newSize)
public void clear()
public int getSize()
public void close()
public boolean requiresLayout()