npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rotorsoft/act-pino

v1.0.4

Published

Pino logger adapter for @rotorsoft/act

Downloads

341

Readme

@rotorsoft/act-pino

NPM Version NPM Downloads License: MIT

Drop-in pino logger adapter for @rotorsoft/act.

Why this package

Act ships with a built-in ConsoleLogger that's adequate for development and small deployments — colorized human-readable output in dev, JSON lines in production. Pino is the right answer when you need anything more: file rotation, OpenTelemetry transport, async sinks, redaction of sensitive fields, request-id binding via child loggers, or any of pino's existing transport ecosystem.

PinoLogger implements Act's Logger port exactly (validated by the TCK), so swapping it in is a one-line change at bootstrap. No other framework code is affected.

Installation

pnpm add @rotorsoft/act-pino

Quick start

import { log } from "@rotorsoft/act";
import { PinoLogger } from "@rotorsoft/act-pino";

// One line at bootstrap — every framework log call now goes through pino.
log(new PinoLogger());

That's the whole integration. Everything below is options and recipes.

API

  • PinoLogger — class implementing Act's Logger port. Construct once, pass to log().
  • PinoLoggerOptions — constructor options (level, pretty toggle, pass-through pino options).

Full type reference: typedoc.

Configuration

| Option | Type | Default | Description | |---|---|---|---| | level | string | config().logLevel | Log level (trace / debug / info / warn / error / fatal) | | pretty | boolean | true outside production | Enable pino-pretty for human-readable output | | options | pino.LoggerOptions | {} | Pass-through to pino — transports, serializers, redaction, etc. |

// Custom log level
log(new PinoLogger({ level: "debug" }));

// Force structured JSON in dev
log(new PinoLogger({ pretty: false }));

// Redaction + custom serializers
log(new PinoLogger({
  options: {
    redact: ["password", "secret", "token"],
    serializers: { req: (r) => ({ method: r.method, url: r.url }) },
  },
}));

Environment integration

PinoLogger reads defaults from Act's config(), which in turn reads:

  • LOG_LEVEL — overrides level (default "info").
  • LOG_SINGLE_LINE — affects pino-pretty formatting.
  • NODE_ENV=production — disables pretty-printing by default (structured JSON output).

Common patterns

String and object messages

Both forms are supported, matching pino's signature:

const logger = new PinoLogger();

logger.info("Server started");                       // string
logger.info({ port: 4000 }, "Server started");        // object + string
logger.info({ event: "startup", port: 4000 });        // object only

Child loggers (inherited bindings)

const root = new PinoLogger();
const payments = root.child({ module: "payments" });

payments.info("Processing payment"); // emits { module: "payments", ... }

Graceful shutdown

await logger.dispose(); // flushes buffered logs

Pair with dispose() from @rotorsoft/act to wire pino flush into the framework's signal-handler shutdown sequence.

When to use this vs the default ConsoleLogger

| You want… | Use | |---|---| | Quick dev loop with colorized output | ConsoleLogger (default — no install needed) | | File rotation, async sinks, OpenTelemetry export | PinoLogger | | Redaction of sensitive fields | PinoLogger (options.redact) | | Request-scoped child loggers | PinoLogger (.child()) | | Pretty-printing in dev + JSON in prod | Either — both behave the same. PinoLogger adds transport options on top. |

Compatibility

  • Node: >=22.18.0
  • Peer: @rotorsoft/act >=0.39.0
  • Bundled deps: pino ^10.3.1, pino-pretty ^13.1.3
  • Module formats: ESM (import) and CJS (require). No side effects.

Stability

Public API governed by the Act Stability Charter. PinoLogger implements the Logger contract from @rotorsoft/act and is validated against @rotorsoft/act-tck. Charter is in effect as of 1.0.0; the milestone tracker is milestone 1.0.

Related packages

Documentation

License

MIT