
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
@timberio/winston
Advanced tools
New to Timber? Here's a low-down on logging in Javascript.
@timberio/winston
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");
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!
logger.log({
level: "info", // <-- will use Timber's `info` log level,
message: "Some message" // <-- will also be passed to Timber
});
FAQs
Timber.io - Winston transport
The npm package @timberio/winston receives a total of 14 weekly downloads. As such, @timberio/winston popularity was classified as not popular.
We found that @timberio/winston demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.