Bird
0
0

If you have application.properties with logging.level.root=INFO and application-prod.properties with logging.level.root=ERROR, what will be the logging level when the 'prod' profile is active?

medium📝 Predict Output Q5 of 15
Spring Boot - Application Configuration
If you have application.properties with logging.level.root=INFO and application-prod.properties with logging.level.root=ERROR, what will be the logging level when the 'prod' profile is active?
AINFO
BDEBUG
CERROR
DWARN
Step-by-Step Solution
Solution:
  1. Step 1: Recognize profile property precedence

    Profile-specific properties override default ones when the profile is active.
  2. Step 2: Apply to logging level

    With 'prod' active, logging.level.root=ERROR from application-prod.properties applies.
  3. Final Answer:

    ERROR -> Option C
  4. Quick Check:

    Active profile logging level = ERROR [OK]
Quick Trick: Active profile settings override default config [OK]
Common Mistakes:
  • Using default INFO instead of ERROR
  • Choosing unrelated levels like WARN or DEBUG
  • Ignoring profile activation effect

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes