Class LogVerifier

java.lang.Object
com.atlassian.bamboo.utils.LogVerifier
All Implemented Interfaces:
AutoCloseable

public class LogVerifier extends Object implements AutoCloseable
  • Constructor Details

    • LogVerifier

      public LogVerifier(org.apache.logging.log4j.core.Logger logger)
  • Method Details

    • catchLogMessages

      public static LogVerifier catchLogMessages(Class<?> classType)
    • catchLogMessages

      public static LogVerifier catchLogMessages(org.apache.log4j.Logger logger)
    • catchLogMessages

      public static LogVerifier catchLogMessages(org.apache.logging.log4j.Logger logger)
    • catchLogMessages

      public static LogVerifier catchLogMessages()
    • verifyEventLogged

      public void verifyEventLogged(org.hamcrest.Matcher<org.apache.logging.log4j.core.LogEvent> logEventMatcher)
    • verifyEventNotLogged

      public void verifyEventNotLogged(org.hamcrest.Matcher<org.apache.logging.log4j.core.LogEvent> logEventMatcher)
    • verifyEventsLogged

      @SafeVarargs public final void verifyEventsLogged(org.hamcrest.Matcher<org.apache.logging.log4j.core.LogEvent>... logEventMatchers)
    • verifyEventsNotLogged

      @SafeVarargs public final void verifyEventsNotLogged(org.hamcrest.Matcher<org.apache.logging.log4j.core.LogEvent>... logEventMatchers)
    • verifyEventCount

      public void verifyEventCount(int count)
    • verifyNoEventsLogged

      public void verifyNoEventsLogged()
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • level

      public static org.hamcrest.Matcher<org.apache.logging.log4j.core.LogEvent> level(org.hamcrest.Matcher<? super org.apache.logging.log4j.Level> levelMatcher)
    • exception

      public static org.hamcrest.Matcher<org.apache.logging.log4j.core.LogEvent> exception(org.hamcrest.Matcher<? super Throwable> subMatcher)
    • renderedMessage

      public static org.hamcrest.Matcher<org.apache.logging.log4j.core.LogEvent> renderedMessage(org.hamcrest.Matcher<? super String> subMatcher)