Timber.io - Winston transport

Usage no npm install needed!

<script type="module">
  import timberioWinston from 'https://cdn.skypack.dev/@timberio/winston';


🌲 Timber - Winston transport

Beta: Ready for testing Speed: Blazing ISC License

New to Timber? Here's a low-down on logging in Javascript.


This NPM library is for creating a Winston 3.x-compatible transport that transmits logs to Timber.io via the @timberio/node logger.

Here's how to get started:


Install the Node.js Timber logger and the Winston transport via NPM:

npm i @timberio/node @timberio/winston


In ES6/Typescript, import both the Timber logger class and the Timber Winston transport class:

import { Timber } from "@timberio/node";
import { TimberTransport } from "@timberio/winston";

For CommonJS, require the packages instead:

const { Timber } = require("@timberio/node");
const { TimberTransport } = require("@timberio/winston");

Creating a client/transport

You can create a client the usual way for @timberio/node, and then pass it into a new instance of TimberTransport:

// Assuming you've imported the Timber packages above,
// also import Winston...
import winston from "winston";

// Create a Timber client
const timber = new Timber("timber-organization-key", "timber-source-key");

// Create a Winston logger - passing in the Timber transport
const logger = winston.createLogger({
  transports: [new TimberTransport(timber)]

// Log as normal in Winston - your logs will sync with Timber.io!
  level: "info", // <-- will use Timber's `info` log level,
  message: "Some message" // <-- will also be passed to Timber