Skip to main content
LogBrew is an observability platform for developers and coding agents, with a generous free tier and no card needed. An error log is a record of the errors that an application, a server, or an operating system writes while it runs. Each entry has a time, a severity level, and a message. Many entries also have a stack trace. This PHP 8.5 error log entry is from a real run:

Where to find the error log

Use these commands to read the errors, or to print where the log is:
On macOS 27.2, the log command gives 1 line for each error:

Error logs and error tracking

An error log keeps 1 entry for each error. Error tracking groups errors with the same cause into 1 issue, and counts each new error as an occurrence of that issue. You need both. The log tells you what happened in 1 request. The issue tells you how often the same failure happens, since when, and in which release.

When to log an error and when to report an issue

  • Log the error when your code handles the failure. Examples are a retry, a fallback, or a 503 response that asks the client to try again.
  • Report an issue when the failure is a bug. An example is an exception that your code does not catch.
  • Do not report a 4xx client error as an issue. It describes a bad request, not a failure in your code. The LogBrew Node.js SDK follows this rule by default.

Test it: 6 error logs and 1 issue

This test sends logs and errors from a Node.js server to LogBrew. It ran on 2026-11-26 with Node.js 22.18, Pino 10.4, @logbrew/node 0.1.30, and @logbrew/sdk 0.1.48.
1

Save the server as checkout.js

The /retry-later route handles the failure and writes an error log. The /checkout route throws an error that the code does not catch.
2

Set the key and run the server

Use the ingest key of your project. See Node.js logging to create it. Run the server 1 time with release checkout-api@2.4.0. Then run it again with release checkout-api@2.6.0.
Each run prints the same 3 lines:
3

Read the error logs

Each run stored 15 logs: 6 info, 6 warning, and 3 error. This command returns the 3 error logs of the second run. Each one has its own trace ID. This is 1 of them, shortened:
The 6 error logs of the 2 runs did not open an issue. LogBrew opens issues from errors that the SDK reports, not from the level of a log.
4

Read the issue

The 6 uncaught errors of the 2 runs made 1 issue with 6 occurrences. The new release did not open a new issue. first_seen_at is from the first run, and release is the release of the last occurrence. This is the issue, shortened:
The fingerprint has 3 parts: the capture source, the error type, and the file of the top stack frame. Errors with the same fingerprint go into the same issue.
5

Read the logs of the failed request

The command returns the 2 logs that the last /checkout request wrote before the error: order created and payment retry.

How LogBrew connects logs and issues

  • Breadcrumbs. The logs that a request writes before an error go into diagnostics.breadcrumbs of the occurrence. Only the logs of the same request go in.
  • Trace ID. Each occurrence keeps the trace ID of its request. Use it with logbrew read logs --trace to read all logs of that request.
  • Release and environment. Logs and issues use the same release and environment filters.
To investigate an issue step by step, see Investigate an issue. To get alerts for new and regressed issues, see the alerting guide.

Structured logging

Choose log fields and levels that you can search.

Node.js logging

Send Winston and Pino logs with their trace IDs.

Python logging

Send records from the standard logging module.

Manage issues

Resolve, archive, assign, and reopen issues.