
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@timberio/bunyan
Advanced tools
New to Timber? Here's a low-down on logging in Javascript.
@timberio/bunyan
This NPM library provides a Bunyan writable stream 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 Bunyan stream plugin via NPM:
npm i @timberio/node @timberio/bunyan
In ES6/Typescript, import both the Timber
logger class and the Timber Bunyan stream class:
import { Timber } from "@timberio/node";
import { TimberStream } from "@timberio/bunyan";
For CommonJS, require the packages instead:
const { Timber } = require("@timberio/node");
const { TimberStream } = require("@timberio/bunyan");
You can create a client the usual way for @timberio/node
, and then pass it into a new instance of TimberStream
:
// Assuming you've imported the Timber packages above, also import Bunyan...
import bunyan from "bunyan";
// Create a Timber client
const timber = new Timber("timber-organization-key", "timber-source-key");
// Create a Bunyan logger - passing in the Timber stream
const logger = bunyan.createLogger({
name: "Example logger",
level: "debug",
streams: [
{
stream: new TimberStream(timber)
}
]
});
// Log as normal in Bunyan - your logs will sync with Timber.io!
logger.info("Hello from Bunyan");
Timber will log at the debug
level and above. Trace logs or any log level below 20
will be ignored.
The fatal
log level is transformed to error
in the Timber logger.
FAQs
Timber.io - Bunyan writable stream
We found that @timberio/bunyan 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.