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 πŸ™

Β© 2025 – Pkg Stats / Ryan Hefner

@augu/pino-transport

v1.4.0

Published

πŸ»β€β„οΈπŸŒ² Pino transport that roughly matches what I like to see in my logs

Downloads

244

Readme

πŸ»β€β„οΈπŸŒ² @augu/pino-transport

Noel's opinionated logging transport for Pino

@augu/pino-transport is an opinionated logging transport for the Pino logging library. This was made to not repeat what this library entails. If you like it, then install it with:

default formatter json formatter

$ npm i @augu/pino-transport
$ yarn add @augu/pino-transport
$ pnpm i @augu/pino-transport

Limitations

  • The library expects you to use msg instead anything set in the name options for pino().

Usage

import pino from 'pino';

const log = pino({
    transports: [
        {
            target: '@augu/pino-transport',
            options: {
                json: true
            }
        }
    ]
});

log.info('Hello, world!');

Custom Transports

You can create custom transports that the transport will transform the logs to. You will need to create a second file that will be serialized to the proper value instead of a plain object; related issue (pinojs/pino#262)

// transport.js
import noelPino, { BaseFormatter, type LogRecord } from '@augu/pino-transport';

class MyFormatter extends BaseFormatter {
    override transform(record: LogRecord) {
        return record.msg;
    }
}

export default (options) =>
    noelPino({
        ...options,
        transport: new MyFormatter()
    });

// main.js
import pino from 'pino';

const log = pino({
    transport: {
        target: './transport.js'
    }
});

log.info('Hello, world!');
// => "Hello, world!" is printed instead

Pino Serializers

This library also comes with custom serializers that I recommend setting in the serializers option when creating a root Pino logger since it will work better with the Default and Json formatters.

import { serializers } from '@augu/pino-transport';
import pino from 'pino';

const log = pino({
    serializers: {
        err: serializers.createErrorSerializer(),
        req: serializers.request,
        res: serializers.response
    }
});

log.info({ err: new Error('woof') }, 'waff');

In 1.3.0, the library provides a createSerializers method to create serializers type-safely:

import { createSerializers } from '@augu/pino-transport';
import pino from 'pino';

const log = pino({
    serializers: createSerializers({
        // Enables the request serializer for `request` from the log record.
        request: false,

        // Enables the response serializer for `response` from the log record.
        response: false,

        // Enables the error serializer for `error` from the log record.
        error: true,

        // List of easier-to-write names when passing in from the log
        // record.
        allow: {
            req: false,
            res: false,
            err: true
        }
    })
});

log.info({ err: new Error('woof') }, 'waff');

License

@augu/pino-transport is released under the MIT License with love by Noel!