package javadsl
Type Members
- class LogCapturingExtension extends BeforeTestExecutionCallback with AfterTestExecutionCallback
See https://pekko.apache.org/docs/pekko/current/typed/testing-async.html#silence-logging-output-from-tests
See https://pekko.apache.org/docs/pekko/current/typed/testing-async.html#silence-logging-output-from-tests
JUnit Jupiter extension to make log lines appear only when the test failed.
Use this in test by adding
@ExtendWithannotation:@ExtendWith(LogCapturingExtension.class)Requires Logback and configuration like the following the logback-test.xml:
<appender name="CapturingAppender" class="org.apache.pekko.actor.testkit.typed.internal.CapturingAppender" /> <logger name="org.apache.pekko.actor.testkit.typed.internal.CapturingAppenderDelegate" > <appender-ref ref="STDOUT"/> </logger> <root level="DEBUG"> <appender-ref ref="CapturingAppender"/> </root>
Deprecated Type Members
- final class LogCapturingJunit4 extends TestRule
See https://pekko.apache.org/docs/pekko/current/typed/testing-async.html#silence-logging-output-from-tests
See https://pekko.apache.org/docs/pekko/current/typed/testing-async.html#silence-logging-output-from-tests
JUnit
TestRuleto make log lines appear only when the test failed.Use this in test by adding a public field annotated with
@Rule:@Rule public final LogCapturingJunit4 logCapturing = new LogCapturingJunit4();
Requires Logback and configuration like the following the logback-test.xml:
<appender name="CapturingAppender" class="org.apache.pekko.actor.testkit.typed.internal.CapturingAppender" /> <logger name="org.apache.pekko.actor.testkit.typed.internal.CapturingAppenderDelegate" > <appender-ref ref="STDOUT"/> </logger> <root level="DEBUG"> <appender-ref ref="CapturingAppender"/> </root>
- Annotations
- @deprecated
- Deprecated
(Since version 2.0.0) Use LogCapturingExtension (JUnit Jupiter) instead