Class LogMessageMatcher
java.lang.Object
org.hamcrest.BaseMatcher<ch.qos.logback.classic.spi.ILoggingEvent>
io.github.cjstehno.testthings.slf4j.match.LogMessageMatcher
- All Implemented Interfaces:
org.hamcrest.Matcher<ch.qos.logback.classic.spi.ILoggingEvent>
,org.hamcrest.SelfDescribing
public class LogMessageMatcher
extends org.hamcrest.BaseMatcher<ch.qos.logback.classic.spi.ILoggingEvent>
A Hamcrest matcher used to match criteria against a log event message.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
describeTo
(org.hamcrest.Description description) static org.hamcrest.Matcher<ch.qos.logback.classic.spi.ILoggingEvent>
logMessage
(org.hamcrest.Matcher<String> matcher) Creates a log message matcher to match against the message string.boolean
Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, isNotNull, toString
-
Constructor Details
-
LogMessageMatcher
public LogMessageMatcher()
-
-
Method Details
-
logMessage
public static org.hamcrest.Matcher<ch.qos.logback.classic.spi.ILoggingEvent> logMessage(org.hamcrest.Matcher<String> matcher) Creates a log message matcher to match against the message string.- Parameters:
matcher
- the message string matcher- Returns:
- the log matcher
-
matches
-
describeTo
public void describeTo(org.hamcrest.Description description)
-