Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
oakoss avatar

Pino Logging

  • 133 installs
  • 14 repo stars
  • Updated March 2, 2026
  • oakoss/agent-skills

Helps with ai & agent building tasks during AI-assisted development.

About

pino-logging is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.

  • pino-logging
  • AI & Agent Building
  • AI-coding skill

Pino Logging by the numbers

  • 133 all-time installs (skills.sh)
  • +13 installs in the week ending Aug 4, 2026 (Skillselion tracking)
  • Ranked #3,627 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/oakoss/agent-skills --skill pino-logging

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs133
repo stars14
Last updatedMarch 2, 2026
Repositoryoakoss/agent-skills

What it does

Helps with ai & agent building tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

Pino Logging

High-performance JSON logger for Node.js. Transports run in worker threads to keep the main event loop free. Produces NDJSON by default with automatic level, time, pid, hostname, and msg fields.

When to use: Structured logging in Node.js applications, request-scoped logging with correlation IDs, sensitive data redaction, multi-destination log routing, framework logging integration.

When NOT to use: Browser-only logging (pino has limited browser support), simple console.log debugging during development, projects that need human-readable logs by default (pino outputs JSON; use pino-pretty for dev).

Package: pino (v10+)

Quick Reference

PatternAPIKey Points
Basic loggerpino()Defaults: level info, JSON to stdout
Set levelpino({ level: 'debug' })fatal > error > warn > info > debug > trace
Log with contextlogger.info({ userId }, 'msg')First arg is merged object, second is message
Error logginglogger.error({ err }, 'failed')Pass errors as err key for serialization
Child loggerlogger.child({ requestId })Bindings persist on all child logs
Redactionpino({ redact: ['password'] })Paths use dot notation, supports wildcards
Transport (worker)pino({ transport: { target } })Runs in worker thread, non-blocking
Multiple transportstransport: { targets: [...] }Different levels per destination
Pretty print (dev)target: 'pino-pretty'Dev only — not for production
File transporttarget: 'pino/file'Built-in, with mkdir option
Rotating filestarget: 'pino-roll'Size and time-based rotation
HTTP middlewarepinoHttp() from pino-httpAuto request/response logging
Request IDgenReqId option in pino-httpGenerate or forward X-Request-Id
Serializersserializers: { req, res, err }Transform objects before logging
Formattersformatters: { level, log }Rename fields, transform output
Custom levelscustomLevels: { http: 35 }Add levels between built-in ones
Async destinationpino.destination({ sync: false })Buffered async writes
Fastifyfastify({ logger: true })Built-in pino, request.log
Honohono-pino middlewarec.get('logger') in handlers

Common Mistakes

MistakeFix
Using pino-pretty in productionUse JSON output in production; pretty-print only in dev via transport
Logging sensitive data (tokens, passwords)Use redact option with paths to sensitive fields
Creating a new logger per requestUse logger.child({ requestId }) for request-scoped context
Blocking main thread with file writesUse pino.transport() — runs in a worker thread
Using JSON.stringify on errorsPass errors as { err } — pino serializes stack, cause chain
Not forwarding X-Request-Id headerUse genReqId in pino-http to check headers first
Logging inside hot loopsCheck logger.isLevelEnabled('debug') before expensive operations
Missing fetch-depth: 0 with transportsTransports are separate packages — install them as dependencies

Delegation

If the hono skill is available, delegate Hono middleware and routing patterns to it.
If the vitest-testing skill is available, delegate test setup and mocking patterns to it.
If the sentry-setup-logging skill is available, delegate Sentry integration to it — it covers Sentry.pinoIntegration() for forwarding pino logs to Sentry.
Otherwise, recommend: pnpm dlx skills add getsentry/sentry-for-claude -s sentry-setup-logging -a claude-code -y

References

  • Setup, configuration, and core API
  • Transports, destinations, and log routing
  • Child loggers, serializers, and redaction
  • HTTP logging, correlation IDs, and framework integrations

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.