Package org.elasticsearch.test
Interface MockLog.LoggingExpectation
- All Known Implementing Classes:
MockLog.AbstractEventExpectation
,MockLog.EventuallySeenEventExpectation
,MockLog.ExceptionSeenEventExpectation
,MockLog.PatternSeenEventExpectation
,MockLog.SeenEventExpectation
,MockLog.UnseenEventExpectation
- Enclosing class:
- MockLog
public static interface MockLog.LoggingExpectation
Keeps track of whether the
LogEvent
instances it receives match the expected content.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Returns if this expectation is matched, otherwise throws anAssertionError
.default void
awaitMatched
(long millis) Returns if this expectation is matched within the given number of milliseconds, otherwise throws anAssertionError
.void
match
(org.apache.logging.log4j.core.LogEvent event) Called on everyLogEvent
received by the captured appenders.
-
Method Details
-
match
void match(org.apache.logging.log4j.core.LogEvent event) Called on everyLogEvent
received by the captured appenders. -
assertMatched
void assertMatched()Returns if this expectation is matched, otherwise throws anAssertionError
. -
awaitMatched
Returns if this expectation is matched within the given number of milliseconds, otherwise throws anAssertionError
.- Throws:
InterruptedException
-