Bird
0
0

Which configuration file does Logback use by default in a Spring Boot project?

easy📝 Conceptual Q2 of 15
Spring Boot - Logging
Which configuration file does Logback use by default in a Spring Boot project?
Alogback.xml
Bapplication.properties
Clog4j.properties
Dlogging.yaml
Step-by-Step Solution
Solution:
  1. Step 1: Recall default Logback config file

    Logback looks for a file named logback.xml in the classpath by default.
  2. Step 2: Differentiate from other config files

    application.properties is for Spring Boot settings, log4j.properties is for Log4j, and logging.yaml is not a default Logback file.
  3. Final Answer:

    logback.xml -> Option A
  4. Quick Check:

    Default config file = D [OK]
Quick Trick: Logback default config is logback.xml [OK]
Common Mistakes:
  • Confusing Spring Boot properties with Logback config
  • Mixing Logback with Log4j config files
  • Assuming YAML is default for Logback

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes