Install Logtail Winston and Logtail Node NPM packages:
Set up Logtail Winston transport:
Use Winston logger as usual:
You should see your logs in Logtail → Live tail.
Winston version 3.2.1 or higher is required.
Please let us know at hello@betterstack.com.
We're happy to help! 🙏
Interested in learning more about using multiple Winston transports and Winston log levels? Check out our Complete Guide to Winston Logging in Node.js.
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!
We use cookies to authenticate users, improve the product user experience, and for personalized ads. Learn more.