Bird
0
0

You configured logging.level.com.example=TRACE but your logs still show only WARN and above. What is a possible reason?

medium📝 Debug Q7 of 15
Spring Boot - Logging
You configured logging.level.com.example=TRACE but your logs still show only WARN and above. What is a possible reason?
ATRACE level is not supported by Spring Boot.
BThe package name is incorrect in the configuration.
CThe logging framework's configuration file (e.g., logback.xml) sets a higher threshold.
DSpring Boot disables TRACE logs by default.
Step-by-Step Solution
Solution:
  1. Step 1: Understand interaction with logging framework

    Spring Boot delegates to frameworks like Logback which have their own config files.
  2. Step 2: Check for framework-level overrides

    If logback.xml sets root or package level to WARN, it overrides Spring Boot properties.
  3. Final Answer:

    The logging framework's configuration file (e.g., logback.xml) sets a higher threshold. -> Option C
  4. Quick Check:

    Logging framework config overrides Spring Boot properties [OK]
Quick Trick: Check logging framework config files for overrides [OK]
Common Mistakes:
  • Assuming Spring Boot disables TRACE
  • Ignoring logging framework config files
  • Mistyping package names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes