Skip to content

NPE when using rootLogger shorthand properties notation #3206

Open
@ayush11-96

Description

@ayush11-96

Currently we are using log4j2 version 2.17.0 with spring boot but while updating log4j2 to 2.17.2 we are getting below error and which is because of the appender of root is initialise to null
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because the return value of "org.apache.logging.log4j.core.config.LoggerConfig.getAppenderRefs()" is null

We are passing below properties:

rootLogger.appenderRef.console.ref=console
rootLogger.appenderRefs=console
rootLogger=INFO

Please help us to understand if we require some changes along with version upgrade?

Metadata

Metadata

Assignees

Labels

bugIncorrect, unexpected, or unintended behavior of existing codegood first issueIssues that are good for contributors looking to get startedwaiting-for-maintainer

Type

No type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions