logger.info() or logger.error().
Installation
Configuration
Create oneSquasherTransport and add it to your Winston logger. Using winston.format.metadata() is recommended so structured fields land in Squasher as searchable metadata.
src/logger.ts
Call
await squasherTransport.close() during shutdown so any queued events are flushed before the
process exits.Usage Example
src/app.ts
POST /v1/ingest/{projectId} with tags.transport = "winston", so you can filter transport-originated logs in Squasher.
Advanced
Custom Levels
The transport maps Winston’s built-in levels to Squasher levels:warn→warningerror→errorfatal→fataldebug,verbose, andsilly→debug- Any other custom level →
info
src/logger.ts
Metadata
When you usewinston.format.metadata(), the transport forwards info.metadata as the event’s extra payload in Squasher.
format.metadata(), extra Winston fields are still forwarded, but metadata() gives you the most predictable shape for nested context.