Skip to content

Conversation

tsachev
Copy link
Contributor

@tsachev tsachev commented Jul 19, 2015

…at is not configured.

Seems that Configuration#getLoggerConfig(String) will return the parent configuration if th specified logger name is not explicitly configured in log4j2 configuration. And setting the log level will change some parent logger level.
For that reason a new additive LoggerConfig has to be created for the specified logger and then added to the configuration.

Fixes gh-3550

…at is not configured.

Seems that Configuration#getLoggerConfig(String) will return the parent configuration if th specified logger name is not explicitly configured in log4j2 configuration. And setting the log level will change some parent logger level.
For that reason a new additive LoggerConfig has to be created for the specified logger and then added to the configuration.

Fixes spring-projectsgh-3550
@wilkinsona
Copy link
Member

Thanks for the PR. I wanted to fix this in 1.2.x, and take a slightly different approach to accessing the logger config to make it harder for a similar problem to occur in the future. That made it easier to start from scratch rather than reworking these changes. Thanks for getting the ball rolling, though.

@wilkinsona wilkinsona closed this Jul 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants