com.example.service?logging.level.com.example=INFO logging.level.com.example.service=DEBUG logging.level.com.example.repository=ERROR
The logging level for com.example.service is set explicitly to DEBUG, which overrides the INFO level set for com.example. So classes in com.example.service log at DEBUG level.
org.project.module in Spring Boot?Option D uses correct YAML syntax with proper indentation and uppercase level name. Option D uses lowercase string which is invalid for Spring Boot log levels. Option D uses invalid syntax with equal sign. Option D uses lowercase level without quotes which is not standard.
logging.level.com.example=DEBUG in application.properties, but logs from com.example.controller still show at INFO level. What is the most likely cause?Spring Boot logging respects the most specific package-level configuration. If com.example.controller has a level set (e.g., INFO), it overrides the broader com.example DEBUG setting.
application.properties:
logging.level.com=ERROR logging.level.com.example=INFO logging.level.com.example.sub=DEBUGWhat is the effective log level for a class in
com.example.sub.module?The class is in com.example.sub.module, which is under com.example.sub. The most specific setting is DEBUG for com.example.sub, so DEBUG applies.
Package-level logging lets you set log levels for many classes in a package at once, making it easier to manage log verbosity without modifying each class.