Class 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
       {
    • Field Detail

      • layout

        protected final org.apache.logging.log4j.core.StringLayout layout
    • Constructor Detail

      • Log4J2Logger

        public Log4J2Logger​(Class testClass)
      • Log4J2Logger

        public Log4J2Logger​(Class testClass,
                            org.apache.logging.log4j.core.StringLayout layout)