@squasher-ai/winston is a Winston transport. It sends your Winston logs to Squasher, and log lines
at error level become issues. This page is tested with version 0.4.2 and Winston 3.19 on Node.js 26.
Install the transport
.env
Add the transport to your logger
src/logger.ts
level sets the lowest level that goes to Squasher. The service field in defaultMeta sets the
service name in Squasher. Other metadata goes into the event’s extra data.
Log errors
Pass the error as the first argument:src/checkout.ts
format.errors({ stack: true }), the event gets the error message and a stack field in its
extra data. Winston does not serialize an Error object inside metadata, so
logger.error("checkout failed", { error }) sends {} for error.
Send a test error
Run this once with the same environment variables:scripts/squasher-test.ts
Options
Winston
warn becomes warning. verbose and silly become debug. Other levels, such as
http, become info.
Limits
- The transport has no
environmentorreleaseoption, so its events have no environment. Automatic AI triage runs only onproductionissues. To triage an issue from this transport, select Run triage in the Squasher triage card on the issue page. - The stack trace is an extra field, so the issue page does not show it as a stack trace.
- The transport does not retry a failed send.
- After an HTTP 401 response, the transport stops sending until the process restarts.
- The batch size and the interval are fixed. You cannot change them.
Give the setup to a coding agent
Copy this prompt into your coding agent to install the transport the same way:Next steps
Node.js SDK
Capture errors with an environment, a release, and stack traces.
Pino transport
Send Pino logs, with an environment option.
Design queryable logs
Choose log fields that are easy to search.
Read AI triage
Learn what the triage summary tells you.