Skip to content

spring boot fails to set logging level correctly while using log4j2 instead of logback #18551

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
c3y28 opened this issue Oct 10, 2019 · 1 comment
Labels
status: duplicate A duplicate of another issue

Comments

@c3y28
Copy link

c3y28 commented Oct 10, 2019

  • Spring Boot 2.1.x.RELEASE
  • JUL as logging API
  • Oracle JDK 11.0.4 or Oracle JDK 1.8.0_221

setting logging level to TRACE in application.properties but not take effect. Actually logging.properties under working JAVA_HOME takes effect

if using default logging.properties, we will find missing these level items in log(config, fine, finer, finest)

please find the attached for a simple demo to reproduce the issue.
spring-boot-logging-demo.zip

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 10, 2019
@wilkinsona
Copy link
Member

Thank you for the sample. To route all JUL logging into Log4j2 you need to set a system property as described in the usage section of their documentation. There's a mention of this in Boot's documentation as well. Given the use of a system property I'm still (#2923 (comment)) wary of enabling this by default so I don't think there's much more that we can do here.

@wilkinsona wilkinsona added status: duplicate A duplicate of another issue and removed status: waiting-for-triage An issue we've not yet triaged labels Oct 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants