Package | Description |
---|---|
org.spf4j.test.log |
spf4j test log backend for slf4j.
|
Modifier and Type | Method and Description |
---|---|
LogAssert |
TestLoggers.dontExpect(String category,
Level minimumLogLevel,
org.hamcrest.Matcher<LogRecord>... matchers)
the opposite of expect.
|
LogAssert |
TestLoggers.expect(String category,
Level minimumLogLevel,
int nrTimes,
long timeout,
TimeUnit unit,
org.hamcrest.Matcher<LogRecord>... matchers) |
LogAssert |
TestLoggers.expect(String category,
Level minimumLogLevel,
int nrTimes,
org.hamcrest.Matcher<LogRecord>... matchers)
Ability to assert is you expect a sequence of logs to be repeated.
|
LogAssert |
TestLoggers.expect(String category,
Level minimumLogLevel,
long timeout,
TimeUnit unit,
org.hamcrest.Matcher<LogRecord>... matchers) |
LogAssert |
TestLoggers.expect(String category,
Level minimumLogLevel,
org.hamcrest.Matcher<LogRecord>... matchers)
Create an log expectation that can be asserted like:
LogAssert expect = TestLoggers.expect("org.spf4j.test", Level.ERROR, Matchers.hasProperty("format",
Matchers.equalTo("Booo")));
LOG.error("Booo", new RuntimeException());
expect.assertObservation();
|
LogAssert |
TestLoggers.expectUncaughtException(long timeout,
TimeUnit unit,
org.hamcrest.Matcher<UncaughtExceptionDetail> matcher)
Assert uncaught exceptions.(from threads)
|
Copyright © 2018 SPF4J. All rights reserved.