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

@xeno-js/pino

v1.0.1

Published

High-performance structured logging integration and Pino adapter for Xeno.js with automatic data redaction and TypeScript support.

Readme



@xeno-js/pino integrates Pino as the structured logging provider for the Xeno.JS ecosystem. It acts as an adapter implementing core logging contracts, ensuring applications produce high-performance JSON logs with built-in data masking.

Installation

npm install @xeno-js/pino pino pino-pretty

The package requires @xeno-js/core and @xeno-js/shared as peer dependencies.


1. Logger Plugin Configuration and Pino Integration

Problem. Enterprise applications require fast, structured logging with built-in protection against leaking sensitive data (such as passwords, tokens, and authorization headers) into log files.

Principle. Logging infrastructure must be configured explicitly through the application builder, decoupling logging providers from business logic while enforcing global redaction and transport options.

Mechanism. The withPinoLogger function exposes a logger plugin that uses PinoLoggerFactory to instantiate a configured PinoLogger client, registering it into the framework via LoggerSetup.

Implementation:

import { XenoAppBuilder } from '@xeno-js/core';
import { withPinoLogger } from '@xeno-js/pino';

const app = await new XenoAppBuilder()
  .addLogger(
    withPinoLogger((options, config) => {
      options.isEnabled = true;
      options.logLevel = 'info';
      options.prettyPrint = true; // Useful for development
      options.destination = 'stdout';
    })
  )
  .build();

Behavior: During bootstrap, the plugin evaluates configuration options, configures default and custom redaction paths (masking fields like password, token, and authorization with [REDACTED]), and directs output streams to either standard output or log files.

Boundary: This package handles logging serialization, formatting, and stream transport. It does not manage log aggregation services or external log collector daemons.


2. Structured Logging and Level Filtering (PinoLogger)

Problem. Unfiltered log verbosity impacts performance and fills log storage with low-priority debug events during production runs.

Principle. Log messages must be filtered based on minimum threshold levels and support structured context payloads alongside optional error objects.

Mechanism: PinoLogger implements the ILoggerClient interface, mapping severity levels (DEBUG, INFO, WARN, ERROR) and filtering out events below the configured minLevel. It normalizes error objects using Pino standard serializers.

Implementation:

The logger is resolved automatically by the framework or injected into services:

import { TOKENS, LOG_LEVEL } from '@xeno-js/core';

// Inside a service or handler
const logger = container.resolve(TOKENS.LOGGER);
logger.track(LOG_LEVEL.INFO, 'User logged in successfully', { userId: 'usr_123' });

Behavior: When track is invoked, PinoLogger checks if the message severity meets or exceeds the minimum threshold. If approved, it merges contextual data, appends serialized errors if present, and delegates output to the underlying Pino instance.

Boundary: PinoLogger translates application log calls into Pino format. It relies on the underlying Pino library for stream writing and output formatting.


License

Released under the MIT License.