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

Viewing application logs


Logging gets a little more complex for any application that is running multiple servers and several different types of processes. Having visibility into everything that is happening within our application is critical to maintaining it. Heroku handles this by combining and sending all of our logs to one place, the Logplex.

The Logplex provides us with a single location to view a stream of our logs across our entire application. In this recipe, we'll learn how to view logs via the CLI. We'll learn how to quickly get visibility into what's happening within our application.

Note

We'll learn more about the Logplex and how to set up log storage in Chapter 5, Error Monitoring and Logging Tools.

How to do it…

To start, let's open up a terminal, navigate to an existing Heroku application, and perform the following steps:

  1. First, to view our applications logs, we can use the logs command:

    $ heroku logs
    2014-03-31T23:35:51.195150+00:00 app[web.1]:   Rendered pages/about.html.slim...