Package org.elasticsearch.test
Interface MockLog.LoggingExpectation
- All Known Implementing Classes:
MockLog.AbstractEventExpectation,MockLog.EventuallySeenEventExpectation,MockLog.ExceptionSeenEventExpectation,MockLog.PatternAndExceptionSeenEventExpectation,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 TypeMethodDescriptionvoidReturns if this expectation is matched, otherwise throws anAssertionError.default voidawaitMatched(long millis) Returns if this expectation is matched within the given number of milliseconds, otherwise throws anAssertionError.voidmatch(org.apache.logging.log4j.core.LogEvent event) Called on everyLogEventreceived by the captured appenders.
-
Method Details
-
match
void match(org.apache.logging.log4j.core.LogEvent event) Called on everyLogEventreceived 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
-