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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    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
    matches(Object actual)
     

    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
  • 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

      public boolean matches(Object actual)
    • describeTo

      public void describeTo(org.hamcrest.Description description)