import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.junit.jupiter.api.Test; public class TestLog { private static final Logger LOG = LogManager.getLogger(); @Test public void test() { LOG.info("This classpath:{}",System.getProperty("java.class.path")); LOG.trace("The trace level message must show"); LOG.debug("The debug level message must show"); LOG.info("The info level message must show as well"); } }