public class CapturedLogging
extends org.junit.rules.ExternalResource
| Constructor and Description |
|---|
CapturedLogging(Class logSource) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
after() |
protected void |
before() |
static org.hamcrest.Matcher<CapturedLogging> |
didLog(org.hamcrest.Matcher<org.apache.log4j.spi.LoggingEvent> loggingEventMatcher) |
static org.hamcrest.Matcher<CapturedLogging> |
didLogDebug(org.hamcrest.Matcher<String> messageMatcher) |
static org.hamcrest.Matcher<CapturedLogging> |
didLogDebug(String... substrings) |
static org.hamcrest.Matcher<CapturedLogging> |
didLogError(org.hamcrest.Matcher<String> messageMatcher) |
static org.hamcrest.Matcher<CapturedLogging> |
didLogError(String... substrings) |
static org.hamcrest.Matcher<CapturedLogging> |
didLogInfo(org.hamcrest.Matcher<String> messageMatcher) |
static org.hamcrest.Matcher<CapturedLogging> |
didLogInfo(String... substrings) |
static org.hamcrest.Matcher<CapturedLogging> |
didLogWarn(org.hamcrest.Matcher<String> messageMatcher) |
static org.hamcrest.Matcher<CapturedLogging> |
didLogWarn(String... substrings) |
List<org.apache.log4j.spi.LoggingEvent> |
getLoggingEvents() |
static org.hamcrest.Matcher<org.apache.log4j.spi.LoggingEvent> |
levelAndMessageMatch(org.apache.log4j.Level level,
org.hamcrest.Matcher<String> messageMatcher) |
static org.hamcrest.Matcher<org.apache.log4j.spi.LoggingEvent> |
levelIs(org.apache.log4j.Level level) |
static org.hamcrest.Matcher<org.apache.log4j.spi.LoggingEvent> |
messageMatches(org.hamcrest.Matcher<String> stringMatcher) |
static org.hamcrest.Matcher<org.apache.log4j.spi.LoggingEvent> |
throwableMatches(org.hamcrest.Matcher<Throwable> throwableMatcher) |
String |
toString() |
public CapturedLogging(Class logSource)
public List<org.apache.log4j.spi.LoggingEvent> getLoggingEvents()
protected void before()
throws Throwable
before in class org.junit.rules.ExternalResourceThrowableprotected void after()
after in class org.junit.rules.ExternalResourcepublic static org.hamcrest.Matcher<CapturedLogging> didLog(org.hamcrest.Matcher<org.apache.log4j.spi.LoggingEvent> loggingEventMatcher)
public static org.hamcrest.Matcher<CapturedLogging> didLogError(org.hamcrest.Matcher<String> messageMatcher)
public static org.hamcrest.Matcher<CapturedLogging> didLogError(String... substrings)
public static org.hamcrest.Matcher<CapturedLogging> didLogWarn(org.hamcrest.Matcher<String> messageMatcher)
public static org.hamcrest.Matcher<CapturedLogging> didLogWarn(String... substrings)
public static org.hamcrest.Matcher<CapturedLogging> didLogInfo(org.hamcrest.Matcher<String> messageMatcher)
public static org.hamcrest.Matcher<CapturedLogging> didLogInfo(String... substrings)
public static org.hamcrest.Matcher<CapturedLogging> didLogDebug(org.hamcrest.Matcher<String> messageMatcher)
public static org.hamcrest.Matcher<CapturedLogging> didLogDebug(String... substrings)
public static org.hamcrest.Matcher<org.apache.log4j.spi.LoggingEvent> levelIs(org.apache.log4j.Level level)
public static org.hamcrest.Matcher<org.apache.log4j.spi.LoggingEvent> messageMatches(org.hamcrest.Matcher<String> stringMatcher)
public static org.hamcrest.Matcher<org.apache.log4j.spi.LoggingEvent> throwableMatches(org.hamcrest.Matcher<Throwable> throwableMatcher)
public static org.hamcrest.Matcher<org.apache.log4j.spi.LoggingEvent> levelAndMessageMatch(org.apache.log4j.Level level,
org.hamcrest.Matcher<String> messageMatcher)
Copyright © 2019 Atlassian. All rights reserved.