Better Stack Winston transport | Better Stack Documentation

Explore documentation

Start logging in 3 steps

1. Install

Install Logtail Winston and Logtail Node NPM packages:

Install Logtail packages

Copied!

2. Setup

Set up Logtail Winston transport:

Set up Winston logger

Copied!

3. Start logging 🎉

Use Winston logger as usual:

Send logs to Logtail

Copied!

You should see your logs in Logtail → Live tail.

Winston version 3.2.1 or higher is required.

Need help?

Please let us know at hello@betterstack.com.
We're happy to help! 🙏

Additional resources

Interested in learning more about using multiple Winston transports and Winston log levels? Check out our Complete Guide to Winston Logging in Node.js.

Common issues

TypeScript error during import

You may encounter TypeScript errors when including the transformer, which can be fixed by modifying the TypeScript config.

For a 'TransportStream' error:

Modify tsconfig.json with:

Thanks @Nightbr for submitting this!