Where to find the error log
Use these commands to read the errors, or to print where the log is:
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
503response 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
4xxclient 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 Each run prints the same 3 lines:
checkout-api@2.4.0. Then run it again with release
checkout-api@2.6.0.3
Read the error logs
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: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
first_seen_at is from the first
run, and release is the release of the last occurrence. This is the
issue, shortened:5
Read the logs of the failed request
/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.breadcrumbsof 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 --traceto read all logs of that request. - Release and environment. Logs and issues use the same
releaseandenvironmentfilters.
Related pages
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.
