Class LogLevelMatcher
java.lang.Object
org.hamcrest.BaseMatcher<ch.qos.logback.classic.spi.ILoggingEvent>
io.github.cjstehno.testthings.slf4j.match.LogLevelMatcher
- All Implemented Interfaces:
org.hamcrest.Matcher<ch.qos.logback.classic.spi.ILoggingEvent>
,org.hamcrest.SelfDescribing
public abstract class LogLevelMatcher
extends org.hamcrest.BaseMatcher<ch.qos.logback.classic.spi.ILoggingEvent>
A Hamcrest matcher used to match log level criteria on a logging event.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.hamcrest.Matcher<ch.qos.logback.classic.spi.ILoggingEvent>
logLevelAtLeast
(ch.qos.logback.classic.Level level) Creates a log level matcher matching the configured or higher log level.static org.hamcrest.Matcher<ch.qos.logback.classic.spi.ILoggingEvent>
logLevelEqualTo
(ch.qos.logback.classic.Level level) Creates a log level matcher matching the configured log level.Methods inherited from class org.hamcrest.BaseMatcher
_dont_implement_Matcher___instead_extend_BaseMatcher_, describeMismatch, isNotNull, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hamcrest.Matcher
matches
Methods inherited from interface org.hamcrest.SelfDescribing
describeTo
-
Constructor Details
-
LogLevelMatcher
public LogLevelMatcher()
-
-
Method Details
-
logLevelEqualTo
public static org.hamcrest.Matcher<ch.qos.logback.classic.spi.ILoggingEvent> logLevelEqualTo(ch.qos.logback.classic.Level level) Creates a log level matcher matching the configured log level.- Parameters:
level
- the target level- Returns:
- the matcher
-
logLevelAtLeast
public static org.hamcrest.Matcher<ch.qos.logback.classic.spi.ILoggingEvent> logLevelAtLeast(ch.qos.logback.classic.Level level) Creates a log level matcher matching the configured or higher log level.- Parameters:
level
- the target level minimum- Returns:
- the matcher
-