Registry / web-framework / hono-pino-logger

hono-pino-logger

JSON →
library1.0.0jsnpmunverified

Pino logger middleware for Hono v1.0.0. Integrates the high-performance Pino logger with the Hono web framework. Releases follow semver. Key differentiator: lightweight, type-safe, and minimal configuration compared to other Hono logging solutions.

npm install hono-pino-logger
INSTALL
IMPORT
SIG · HONO-PINO-LOGGER
H
hono-pino-logger
web-frameworkjavascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

pinoLogger
import { pinoLogger } from 'hono-pino-logger'
const pinoLogger = require('hono-pino-logger')
ESM only; CommonJS require will fail.
default
import pinoLogger from 'hono-pino-logger'
import { pinoLogger } from 'hono-pino-logger'
Named export pinoLogger is correct; default export does not exist.
typeof pinoLogger
import type { pinoLogger } from 'hono-pino-logger'
import { pinoLogger } from 'hono-pino-logger'
Use type import only for type checking; pinoLogger is a function.

Creates a Hono app with Pino logging for all routes using default logger.

import { Hono } from 'hono' import { pinoLogger } from 'hono-pino-logger' const app = new Hono() app.use('*', pinoLogger()) app.get('/', (c) => c.text('Hello')) export default app
Debug
Known issues
breakinghono version must be >=4
fix
Ensure hono version in package.json is >=4.0.0
affects: >=1.0.0
gotchapino-pretty not included; must be installed separately for pretty-printing
fix
npm install pino-pretty and configure pino accordingly
affects: >=1.0.0
gotchaLogger must be attached before route handlers to log requests
fix
Call app.use('*', pinoLogger()) before registering routes
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'hono-pino-logger'
Package not installed or typo in package name
fix
Run 'npm install hono-pino-logger' and check spelling
TypeError: pinoLogger is not a function
Using default import instead of named import
fix
Use '{ pinoLogger }' in import statement
Error: hono must be version >=4
Installed hono version is lower than 4
fix
Update hono: npm install hono@latest
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
honorequiredPeer dependency required as middleware runtime
pinooptionalOptional if using default logger; required for custom pino instance
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
2
Resources
hono-pino-logger — npm install hono-pino-logger · libregistry