Book Image

Heroku Cookbook

By : Mike Coutermarsh
Book Image

Heroku Cookbook

By: Mike Coutermarsh

Overview of this book

Heroku is a Platform as a Service that enables developers to rapidly deploy and scale their web applications. Heroku is designed for developer happiness, freeing developers from doing system administrative tasks such as configuring servers and setting up load balancers. Developers are able to focus on what they do best, building web applications, while leaving the details of deployment and scaling to the experts at Heroku. This practical guide is packed with step-by-step solutions to problems faced by every production-level web application hosted on Heroku. You'll quickly get comfortable with managing your Heroku applications from the command line and then learn everything you need to know to deploy and administer production-level web applications.
Table of Contents (17 chapters)
Heroku Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up log draining with LogEntries


The amount of log information that Heroku keeps for our application is limited to 1,500 lines. For a production application, this will only cover a very small span of time. We need to set up a log-draining service to keep a historical record of our logs and make it easy to search and view them. Here, we will learn how to set up Logentries on Heroku.

How to do it…

We can quickly get going with Logentries by installing it as an add-on through the CLI. Let's open up a terminal and navigate to our Heroku application to get started; then, we can perform the following steps:

  1. First, let's install the Logentries add-on for our application:

    $ heroku addons:add logentries
    
  2. This command will set up a log drain that will automatically stream our logs to Logentries. Let's open it up and take a look:

    $ heroku addons:open logentries
    
  3. Logentries will automatically send us alerts when there are errors in our application. We can configure these by clicking on Tags &...