Skip to content

Setting the log level application.properties changes the parent log level is logger is not explicitly defined in log4j2 configuration. #3550

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tsachev opened this issue Jul 19, 2015 · 0 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@tsachev
Copy link
Contributor

tsachev commented Jul 19, 2015

When using log4j2 and I set the log level in application.properties for a logger that is not explicitly configured in log4j2 configuration file it actually changes its parent logger level (in worst case the root logger level).

tsachev added a commit to tsachev/spring-boot that referenced this issue 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 spring-projectsgh-3550
@wilkinsona wilkinsona self-assigned this Jul 22, 2015
@wilkinsona wilkinsona added this to the 1.2.6 milestone Jul 22, 2015
@wilkinsona wilkinsona added the type: bug A general bug label Jul 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants