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 classLog4J2Logger.LogLevelstatic interfaceLog4J2Logger.Record
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.core.StringLayoutlayout-
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.StatementapplyForAnnotation(org.junit.runners.model.Statement statement, org.junit.runner.Description description, Log4J2Logger.Record record)Stringsnapshot()-
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:
applyForAnnotationin classAnnotatedMethodTemplate<Log4J2Logger.Record>
-
snapshot
public String snapshot()
-
-