pino-js
Installation
SKILL.md
Pino Logging
Apply these conventions when working with pino logging code.
Compatibility
- Current stable checked: Pino
10.3.1. - Pino 10 dropped Node.js 18 support. For Node.js 18 applications, stay on the Pino 9 line unless the runtime can be upgraded.
- Official runtimes are Node.js, Bare, and Pear; browser usage has a separate API surface. Bundlers must emit Pino worker/transport support files separately.
Logger Creation
- Create with
pino(options, destination). Both arguments are optional. - Key options:
level(default'info'),name,base(default{pid, hostname}— set toundefinedto omit),timestamp(defaulttrue),messageKey(default'msg'),errorKey(default'err'). - Use
enabled: falseto disable logging entirely (e.g., in tests). - Use
nestedKeyto namespace logged objects and avoid key collisions with the log envelope. depthLimit(default5) andedgeLimit(default100) only affect Pino's fallback serializer afterJSON.stringifythrows; do not rely on them as general output-size or traversal limits.