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

@thzero/library_server_logger_pino

v0.19.1

Published

![GitHub package.json version](https://img.shields.io/github/package-json/v/thzero/library_server_logger_pino) ![David](https://img.shields.io/david/thzero/library_server_logger_pino) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](

Readme

GitHub package.json version David License: MIT

library_server_logger_pino

A pino backed logger for @thzero/library_server.

Registers as one of the logger services the framework fans out to, so an application can run pino alone or alongside another logger (winston, syslog) without changing any calling code.

Requirements

NodeJs

NodeJs version 22+

Installation

NPM

npm install @thzero/library_server_logger_pino

Peer dependencies

  • @thzero/library_common
  • @thzero/library_common_service
  • @thzero/library_server

What it provides

A single default export, LoggerService, implementing the logger contract the framework calls:

| Method | Signature | |---|---| | debug / error / fatal / info / trace / warn | (clazz, method, message, data, correlationId, isClient) | | debug2 / error2 / fatal2 / info2 / trace2 / warn2 | (message, data, correlationId, isClient) | | exception | (clazz, method, ex, correlationId, isClient) | | exception2 | (ex, correlationId, isClient) | | raw | (message, data, correlationId, isClient) | | initLogger | (logLevel, prettify, config) |

The 2 variants are the same call without a class and method — use them where there is no meaningful originating class.

Every line is formatted by _format, which puts the correlationId first so a request can be traced across services:

(sNC7TWVZY9ChN1wQk6qqW) MongoRepository._initializeDb: databaseName resolved

An isClient of true prefixes the message with CLIENT: , marking lines that originated in a browser and were relayed through /utility/logger.

Configuration

initLogger is called for you during boot from the logging block; there is nothing pino-specific to configure.

{
    "app": {
        "logging": {
            "level": "debug",
            "prettify": false
        }
    }
}
  • level — any pino level. Overridden by the LOG_LEVEL environment variable.
  • prettify — when true, output is routed through a pino-pretty transport. Overridden by LOG_PRETTIFY. pino-pretty is not a dependency of this package — add it to the application when you turn this on, or boot will fail resolving the transport.

Wiring it up

Register it from _initServicesLoggers in your BootMain derived class:

import pinoLoggerService from '@thzero/library_server_logger_pino';

class AppBootMain extends BootMain {
    _initServicesLoggers() {
        this._registerServicesLogger(AppConstants.InjectorKeys.SERVICE_LOGGER_PINO, new pinoLoggerService());
    }
}

_registerServicesLogger both injects the service under that key and adds the key to the fan-out list, so more than one call registers more than one logger.

Development

npm run lint       # eslint .
npm run lint:fix   # eslint . --fix
npm test           # node --test "test/*.test.js"