Recall & Review
beginner
What is file-based logging in Spring Boot?
File-based logging means saving log messages to a file on your computer instead of just showing them on the screen. This helps keep a record of what happened in your app.
Click to reveal answer
beginner
Which property in Spring Boot configures the log file name?
The property
logging.file.name sets the name and location of the log file where messages will be saved.Click to reveal answer
beginner
How do you enable file-based logging in Spring Boot using
application.properties?Add
logging.file.name=app.log to application.properties. This creates a file named app.log in your project folder to store logs.Click to reveal answer
beginner
What is the benefit of using file-based logging over console logging?
File-based logging keeps a permanent record of logs, which helps when you want to check past events or debug problems after the app has run.
Click to reveal answer
intermediate
How can you control the log level for file-based logging in Spring Boot?
Use properties like
logging.level.root=INFO or logging.level.com.example=DEBUG in application.properties to set how detailed the logs should be.Click to reveal answer
Which property sets the log file name in Spring Boot?
✗ Incorrect
The correct property to set the log file name is
logging.file.name.What happens if you do not configure file-based logging in Spring Boot?
✗ Incorrect
Without file-based logging configured, logs appear only on the console (screen).
How do you set the log level to DEBUG for a specific package in Spring Boot?
✗ Incorrect
Use
logging.level.com.example=DEBUG to set DEBUG level for that package.Why is file-based logging useful?
✗ Incorrect
File-based logging saves logs to a file so you can check them anytime later.
Which file typically contains the logging configuration in Spring Boot?
✗ Incorrect
Spring Boot commonly uses
application.properties for logging settings.Explain how to enable file-based logging in a Spring Boot application.
Think about which file holds configuration and what property controls the log file.
You got /3 concepts.
Describe the advantages of using file-based logging compared to console logging.
Consider why keeping logs in a file might be better than just seeing them on screen.
You got /3 concepts.