NOTE: You are looking at documentation for an older release. For the latest information, see the current release documentation.
Log4j 2 Logger
editLog4j 2 Logger
editYou need to also include Log4j 2 dependencies:
<dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <version>2.17.1</version> </dependency>
And also provide a Log4j 2 configuration file in your classpath.
For example, you can add in your src/main/resources
project dir a log4j2.properties
file like:
appender.console.type = Console appender.console.name = console appender.console.layout.type = PatternLayout appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %marker%m%n rootLogger.level = info rootLogger.appenderRef.console.ref = console