public class RecordingAppender
extends org.apache.log4j.AppenderSkeleton
| Constructor and Description |
|---|
RecordingAppender()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
append(org.apache.log4j.spi.LoggingEvent event) |
void |
assertContains(Selector selector,
org.apache.log4j.spi.LoggingEvent... events)
Assert that the recorded events contains the list of events in the order
specified without intervening events.
|
void |
assertHas(Selector selector,
List<org.apache.log4j.spi.LoggingEvent> events)
Assert that the recorded events contains the list of events in the order
specified without intervening events.
|
void |
assertHasEnd(Selector selector,
org.apache.log4j.spi.LoggingEvent... end)
Assert that the recorded events ends with the list of events in the order
specified without intervening events.
|
void |
assertHasStart(Selector selector,
org.apache.log4j.spi.LoggingEvent... start)
Assert that the recorded events starts with the list of events in the
order specified without intervening events.
|
void |
clear()
Clear the list of recorded events.
|
void |
close()
Close the appender.
|
boolean |
contains(Selector selector,
org.apache.log4j.spi.LoggingEvent... events)
Return true if the list of events are found in the recorded events in
order without intervening events.
|
Iterator<org.apache.log4j.spi.LoggingEvent> |
from(Selector selector,
org.apache.log4j.spi.LoggingEvent start)
Returns an iterator over the recorded events following the first instance
of the start event.
|
Iterator<org.apache.log4j.spi.LoggingEvent> |
getEvents()
Returns an iterator over all the recorded events.
|
boolean |
has(Selector selector,
List<org.apache.log4j.spi.LoggingEvent> things)
Check that the recorded events contains with the list of events in the
order specified without intervening events.
|
boolean |
hasEnd(Selector selector,
List<org.apache.log4j.spi.LoggingEvent> events)
Check that the recorded events ends with the list of events in the order
specified without intervening events.
|
boolean |
hasStart(Selector selector,
List<org.apache.log4j.spi.LoggingEvent> events)
Check that the recorded events starts with the list of events in the
order specified without intervening events.
|
boolean |
requiresLayout() |
public void close()
public boolean requiresLayout()
protected void append(org.apache.log4j.spi.LoggingEvent event)
append in class org.apache.log4j.AppenderSkeletonpublic final boolean has(Selector selector, List<org.apache.log4j.spi.LoggingEvent> things)
selector - The selector to use.things - the list of events to expect.public final boolean hasStart(Selector selector, List<org.apache.log4j.spi.LoggingEvent> events)
selector - The selector to use.events - the list of events to expect.public final boolean hasEnd(Selector selector, List<org.apache.log4j.spi.LoggingEvent> events)
selector - The selector to use.events - the list of events to expect.public final void assertHas(Selector selector, List<org.apache.log4j.spi.LoggingEvent> events)
selector - The selector to use.events - the list of events to expect.public final void assertContains(Selector selector, org.apache.log4j.spi.LoggingEvent... events)
selector - The selector to use.events - the list of events to expect.public final void assertHasStart(Selector selector, org.apache.log4j.spi.LoggingEvent... start)
selector - The selector to use.start - the list of events to expect.public final void assertHasEnd(Selector selector, org.apache.log4j.spi.LoggingEvent... end)
selector - The selector to use.end - the list of events to expect.public final void clear()
public final boolean contains(Selector selector, org.apache.log4j.spi.LoggingEvent... events)
selector - The selector to use.events - The list of events to check.public final Iterator<org.apache.log4j.spi.LoggingEvent> getEvents()
public final Iterator<org.apache.log4j.spi.LoggingEvent> from(Selector selector, org.apache.log4j.spi.LoggingEvent start)
selector - The selector to use.start - The starting event.Copyright © 2015 XENEI.com. All Rights Reserved.