
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
bunyan-adaptor
Advanced tools
Types and mapper for Pino / Bunyan logging methods.
Support Pino / Bunyan compatible loggers with fallback console.log().
BunyanLite – simplified Pino / Bunyan type subsetsApart from the actual adapter, this module also ships with some useful generic TypeScript types, where BunyanLite is the most usable of them.
The BunyanLite type can be used wherever one wants to reference a basic Pino / Bunyan subset. That type can then be fulfilled by Pino, Bunyan, a logger created by this module or by another module implementing the same subset.
BunyanLite – specifies the lite subset of the Bunyan interface that this module supportsBunyanLogMethod – specifies the very simple syntax for the individual log methodsBunyanChildMethod – specified the syntax of the child() methodBunyanLite.fatal().error().warn().info().debug().trace().child(data)createLogger() – map any logger to BunyanLite subsetSimple CommonJS example:
const logger = require('bunyan-adaptor')({
log: console.log.bind(console),
error: console.error.bind(console),
});
logger.error('Warning'); // Uses console.error()
logger.info('Informational'); // Uses console.log()
Simple ESM example:
import createLogger from 'bunyan-adaptor';
const logger = createLogger({
log: console.log.bind(console),
error: console.error.bind(console),
});
logger.error('Warning'); // Uses console.error()
logger.info('Informational'); // Uses console.log()
Also available as a non-default export:
const { createLogger } = require('bunyan-adaptor');
import { createLogger } from 'bunyan-adaptor';
Maps options methods to all seven Bunyan log levels.
.fatal() – maps to options.fatal and fallbacks to options.error and options.log in that order.error() – maps to options.error and fallbacks to options.log in that order.warn() – maps to options.warn and fallbacks to options.log.info() – maps to options.info and fallbacks to options.log.debug() – maps to options.debug and fallbacks to options.verbose and options.log in that order.trace() – maps to options.trace and fallbacks to options.verbose and options.log in that orderoptions.log itself fallbacks to console.log()
In addition to the above there's also support for:
.child(data) – used to create a child logger. Defaults to built in method, can be overriden using options.child7.0.0 (2025-02-12)
FAQs
Maps the major Bunyan/Pino logging methods to custom methods
The npm package bunyan-adaptor receives a total of 630 weekly downloads. As such, bunyan-adaptor popularity was classified as not popular.
We found that bunyan-adaptor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.