@jazzxp/pino-extended@1.2.1Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
JazzXP/pino-extendedExtension to Pino for scoped logging
This package works with Node.js, Deno, Bun, BrowsersIt is unknown whether this package works with Cloudflare Workers




JSR Score
100%
Published
7 months ago (1.2.1)
Pino Extended
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
Add Package
deno add jsr:@jazzxp/pino-extended
Import symbol
import * as pino_extended from "@jazzxp/pino-extended";
Import directly with a jsr specifier
import * as pino_extended from "jsr:@jazzxp/pino-extended";
Add Package
pnpm i jsr:@jazzxp/pino-extended
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
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";