Skip to main content
Home

Built and signed on GitHub Actions

Extension to Pino for scoped logging

This package works with Node.js, Deno, Bun, BrowsersIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
7 months ago (1.2.1)

Pino Extended

JSR NPM Version GitHub Release

License CodeQL

Extends Pino with a couple of useful abilities.

Firstly we log on going out of scope (by leveraging Javascript's using keyword), rather than immediately. This allows us to easily compute and log run times.

To go along with that, if you log the same field multiple times, it will convert it into an array so you won't lose data.

Installation

NPM

npm install @jazzxp/pino-extended

Github

npm login --scope=@jazzxp --auth-type=legacy --registry=https://npm.pkg.github.com
npm install @jazzxp/pino-extended

JSR

npx jsr add @jazzxp/pino-extended

Basic Usage

using log = startLog('EventName');
log.log({message: 'message'});

Advanced Usage

Automatically switch the event to another level

using log = startLog('EventName');
log.error({message: 'message'});

Change the default event level

using log = startLog('EventName', 'warn');
log.log({message: 'message'});
Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@jazzxp/pino-extended

Import symbol

import * as pino_extended from "@jazzxp/pino-extended";
or

Import directly with a jsr specifier

import * as pino_extended from "jsr:@jazzxp/pino-extended";

Add Package

pnpm i jsr:@jazzxp/pino-extended
or (using pnpm 10.8 or older)
pnpm dlx jsr add @jazzxp/pino-extended

Import symbol

import * as pino_extended from "@jazzxp/pino-extended";

Add Package

yarn add jsr:@jazzxp/pino-extended
or (using Yarn 4.8 or older)
yarn dlx jsr add @jazzxp/pino-extended

Import symbol

import * as pino_extended from "@jazzxp/pino-extended";

Add Package

vlt install jsr:@jazzxp/pino-extended

Import symbol

import * as pino_extended from "@jazzxp/pino-extended";

Add Package

npx jsr add @jazzxp/pino-extended

Import symbol

import * as pino_extended from "@jazzxp/pino-extended";

Add Package

bunx jsr add @jazzxp/pino-extended

Import symbol

import * as pino_extended from "@jazzxp/pino-extended";