We can set up various searches in PaperTrail and have it automatically e-mail a summary of all the events that match our search for the day. In this recipe, we will learn how to set up a search for specific HTTP status codes and have PaperTrail e-mail us when they are set up.
Note
We'll need PaperTrail set up for this recipe; refer to the previous recipe if you do not have it set up yet.
To start, we'll need to open up a terminal and navigate to our Heroku project with PaperTrail installed. Then, we can perform the following steps:
First, let's open up the PaperTrail dashboard. We can quickly do this from the command line:
$ heroku addons:open papertrail
Now, we want to create a search for all the events that resulted in a 404 (Not Found) or 500 (Internal Server Error) HTTP response code. We can do this by typing
status=404 OR status=500
into the search box at the bottom of the page.Next, let's click on Search, and we'll see the...