From the course: Ruby on Rails 5 Essential Training
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Logging - Ruby on Rails Tutorial
From the course: Ruby on Rails 5 Essential Training
Logging
- [Instructor] In this movie, we'll take a look at the log files that Rails uses. We'll learn how to configure them and write our own information to them. Note that the log files I'm referring to here are the application logs, which are different from your web server logs. Basic request data and any errors which occur before requests get to the Rails application are going to show up in the server logs. But the web server only knows about the request that comes in and the data that it sends back. Everything that happens once it hands off the request to the Rails application remains a mystery to the web server. But the Rails log files can provide lots of rich detail about what happens as Rails processes the request. The place that you'll find log files is in the log directory, and then you'll find a different log file for each environment; so development, production, and test. If you haven't activated those other environments yet, then those log files just won't be there. At the moment,…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.