Registry / devops / pino-tiny

pino-tiny

JSON →
library2.2.0jsnpmunverified

A minimal CLI and programmatic log formatter for Pino, providing color-coded, compact output with optional emoji icons, timestamps, and web request/response stats. Current stable version is 2.2.0. It differs from alternatives like pino-colada by offering extensibility via a filter function, full control over output elements, and TypeScript type declarations. Designed for development use, it outputs log level, message, and optional HTTP request info while stripping other metadata.

npm install pino-tiny
INSTALL
IMPORT
SIG · PINO-TINY
P
pino-tiny
devopsjavascriptv2.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PinoTinyPrettifier
const { PinoTinyPrettifier } = require('pino-tiny')
import { PinoTinyPrettifier } from 'pino-tiny'
pino-tiny is CommonJS only (no ESM exports as of v2.2.0). Use require().
Run
const { Run } = require('pino-tiny')
const Run = require('pino-tiny').Run
Named export, not default. Same CommonJS caveat as PinoTinyPrettifier.
PinoTinyOptions
import type { PinoTinyOptions } from 'pino-tiny'
TypeScript users can import the type directly in .ts files. It's a type-only export.

Sets up pino with the pino-tiny prettifier, logging an info and an error message.

const { PinoTinyPrettifier } = require('pino-tiny') const Pino = require('pino') const logger = new Pino({ prettifier: PinoTinyPrettifier({ hideIcons: false, hideLetters: false, hideTimestamp: false, hideColors: false, hideWeb: false, msgKey: 'msg', filter: (data) => data }), prettyPrint: true }) logger.info('Hello, world!') logger.error({ err: new Error('test') }, 'An error occurred')
Debug
Known issues
breakingPino v7+ changed the prettifier API; pino-tiny may not work with Pino v7 or later without adapters.
fix
For Pino v7+, use pino-tiny as a CLI pipe or check compatibility; programmatic usage may require Pino v6.
affects: >=2.0.0
deprecatedThe 'prettifier' option in Pino constructor is deprecated in Pino v7+.
fix
Use pino-tiny via piping (`node app.js | pino-tiny`) or use pino-pretty with a custom transport.
affects: >=2.0.0
gotchapino-tiny is CommonJS only; attempting ESM import will fail.
fix
Use require() instead of import. If using ES modules, use createRequire or pipe method.
affects: >=1.0.0
gotchaThe filter option can return false to suppress a log entry, but it may cause unexpected behavior if not returning an object.
fix
Ensure filter returns either an object (modified data) or false to drop the entry.
affects: >=1.0.0
gotchaTimestamps are millisecond-based relative times, not absolute date-time strings.
fix
If absolute timestamps are needed, consider using pino-pretty or another formatter.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'pino-tiny'
Package not installed or installed as devDependency only and used in production.
fix
Run npm install -D pino-tiny (dev) or npm install pino-tiny (production).
PinoTinyPrettifier is not a constructor
Calling PinoTinyPrettifier incorrectly (e.g., forgetting new before Pino) or wrong import.
fix
Use: const { PinoTinyPrettifier } = require('pino-tiny') then pass to new Pino({ prettifier: PinoTinyPrettifier(options) })
Cannot read property 'filter' of undefined
Options object passed to PinoTinyPrettifier is undefined or missing filter key.
fix
Pass an options object: PinoTinyPrettifier({ filter: (data) => data })
SyntaxError: Cannot use import statement outside a module
Using ES import syntax in a CommonJS file or node version that doesn't support ESM.
fix
Replace import with require() or set type: 'module' in package.json and use correct ESM setup.
Upgrade
Version history
2.2.0latest on npm
Audit
Dependencies
pinorequiredpino-tiny is a formatter for Pino logger output, but not a direct dependency; users must have Pino installed.
Agent activity
4 hits · last 30 days
node
4
Resources
pino-tiny — npm install pino-tiny · libregistry