Docs menu

Logs

Every environment has four log streams (build, release, application, and HTTP requests), live in the dashboard and searchable afterward.

On this page

Every environment has four log streams: build, release, application, and HTTP requests. Each one streams live in the dashboard and stays searchable afterward. There's nothing to install or configure.

The four streams#

Build logs are a deployment's build output: language detection, dependency installs, asset compilation. Read them when a deployment shows Build Failed.

Release logs are the output of your release process, if your Procfile declares one. Read them when a deployment shows Release Failed, or to confirm a migration ran.

Application logs are everything your app writes to stdout and stderr, from every formation. This is where you'll spend most of your time.

HTTP request logs have one line per request your web formation received, with the method, path, status code, response time, and client IP. Use them to spot spikes or track down 500s without instrumenting your app.

Where to find them#

Build and release logs are on each deployment's page. Application and HTTP request logs are on the environment's Logs tab, which switches between Application Logs and HTTP Requests. A task's output is on its run's page.

The Logs page: an Application/Requests view toggle, filters for formation, time range and search, and a live-tailing stream of log lines The HTTP Requests view of the Logs page, one row per request with time, method, path, status code, response time, and host.

New lines appear as they're written. Pause the stream to read back through older lines, and resume it to catch up.

Filtering#

Both views filter by:

  • Time range: 15 minutes, 1 hour, 6 hours, 24 hours, or your full retention window.
  • Search: a plain substring match on the line.

Application logs also filter by formation, so a noisy worker doesn't bury your web output. HTTP request logs also filter by method, status class (2xx, 3xx, 4xx, 5xx), and path.

Filters apply to the live stream and to history alike.

Retention#

Application and HTTP request logs are kept for 7 days on Standard and 30 days on Pro and Team.

Build, release, and task logs stay with their deployment or run for one year. Build and release logs go sooner if their deployment leaves your deployment history.

Logging from your app#

Write to stdout and stderr. Most frameworks already do, so most apps need no changes.

  • JSON logs are kept as written. One JSON record per line shows as one line.
  • Don't write to log files. Local disk is wiped whenever a formation restarts or deploys. If your framework logs to a file by default, switch it to stdout or stderr.
  • Don't log secrets. Anyone with access to your dashboard can read your logs. Redact tokens, credentials, and personal data as you would on any host.