Recall & Review
beginner
What is the main purpose of logging in a Rails application?
Logging records important events and errors in the application to help developers understand what happened and diagnose issues.
Click to reveal answer
beginner
Name two common types of logs generated by Rails.
1. Development logs - show detailed info during development.<br>2. Production logs - show important events and errors in live apps.
Click to reveal answer
beginner
What is monitoring in the context of a Rails app?
Monitoring means watching the app’s health and performance over time to catch problems early and keep it running smoothly.
Click to reveal answer
beginner
How can you view Rails logs in development mode?
You can see logs in the terminal where you run the Rails server or check the log/development.log file.
Click to reveal answer
beginner
Why is it important to monitor error rates in a Rails app?
Because a sudden increase in errors can mean something is broken, so you can fix it quickly before users are affected.
Click to reveal answer
Where are Rails logs stored by default?
✗ Incorrect
Rails saves logs in the log/ directory, like log/development.log or log/production.log.
Which Rails component helps you write logs in your code?
✗ Incorrect
Rails.logger is used to write messages to the log files.
What does monitoring NOT typically include?
✗ Incorrect
Writing new features is development, not monitoring.
Which log level shows the most detailed information?
✗ Incorrect
DEBUG level logs show the most detailed info useful during development.
Why should production logs be less detailed than development logs?
✗ Incorrect
Less detail in production logs helps save space and keeps the app fast.
Explain how logging and monitoring work together to keep a Rails app healthy.
Think about how logs are like a diary and monitoring is like a doctor checking the app’s health.
You got /4 concepts.
Describe how you would check for errors in a Rails app running in production.
Consider both manual log checking and automated monitoring.
You got /4 concepts.