Bird
0
0

You set logging.pattern.console=%d{HH:mm:ss} %msg%n but the console logs still use the default format. What is the most probable reason?

medium📝 Debug Q6 of 15
Spring Boot - Logging
You set logging.pattern.console=%d{HH:mm:ss} %msg%n but the console logs still use the default format. What is the most probable reason?
AThe logging framework is overridden by an external configuration file
BThe property key is misspelled
CSpring Boot does not support custom console patterns
DThe application needs a restart to apply changes
Step-by-Step Solution
Solution:
  1. Step 1: Verify property correctness

    The property logging.pattern.console is correct and supported.
  2. Step 2: Consider external overrides

    If an external logging config (like logback.xml) exists, it overrides Spring Boot properties.
  3. Step 3: Restart is usually required but not the main cause

    Restarting is necessary but won't help if external config overrides.
  4. Final Answer:

    The logging framework is overridden by an external configuration file -> Option A
  5. Quick Check:

    External config overrides Spring Boot properties [OK]
Quick Trick: External config files override Spring Boot logging properties [OK]
Common Mistakes:
  • Assuming property key is wrong
  • Believing Spring Boot disallows custom console patterns
  • Thinking restart alone fixes the issue

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes