Class Log4J2Logger
- java.lang.Object
-
- com.atlassian.confluence.test.util.AnnotatedMethodTemplate<Log4J2Logger.Record>
-
- com.atlassian.confluence.test.util.Log4J2Logger
-
- All Implemented Interfaces:
org.junit.rules.TestRule
public class Log4J2Logger extends AnnotatedMethodTemplate<Log4J2Logger.Record>
Record the logging output for a given log4j2 logger.Usage:
{@code public class MyTest {
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Log4J2Logger.LogLevel
static interface
Log4J2Logger.Record
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.core.StringLayout
layout
-
Fields inherited from class com.atlassian.confluence.test.util.AnnotatedMethodTemplate
annotationClass, testClass
-
-
Constructor Summary
Constructors Constructor Description Log4J2Logger(Class testClass)
Log4J2Logger(Class testClass, org.apache.logging.log4j.core.StringLayout layout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.junit.runners.model.Statement
applyForAnnotation(org.junit.runners.model.Statement statement, org.junit.runner.Description description, Log4J2Logger.Record record)
String
snapshot()
-
Methods inherited from class com.atlassian.confluence.test.util.AnnotatedMethodTemplate
apply
-
-
-
-
Method Detail
-
applyForAnnotation
protected org.junit.runners.model.Statement applyForAnnotation(org.junit.runners.model.Statement statement, org.junit.runner.Description description, Log4J2Logger.Record record)
- Specified by:
applyForAnnotation
in classAnnotatedMethodTemplate<Log4J2Logger.Record>
-
snapshot
public String snapshot()
-
-