{"id":18421,"library":"hono-pino-logger","title":"hono-pino-logger","description":"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.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/maks-herasymov/hono-pino-logger","tags":["javascript","hono","pino","logger","middleware","typescript"],"install":[{"cmd":"npm install hono-pino-logger","lang":"bash","label":"npm"},{"cmd":"yarn add hono-pino-logger","lang":"bash","label":"yarn"},{"cmd":"pnpm add hono-pino-logger","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency required as middleware runtime","package":"hono","optional":false},{"reason":"Optional if using default logger; required for custom pino instance","package":"pino","optional":true}],"imports":[{"note":"ESM only; CommonJS require will fail.","wrong":"const pinoLogger = require('hono-pino-logger')","symbol":"pinoLogger","correct":"import { pinoLogger } from 'hono-pino-logger'"},{"note":"Named export pinoLogger is correct; default export does not exist.","wrong":"import { pinoLogger } from 'hono-pino-logger'","symbol":"default","correct":"import pinoLogger from 'hono-pino-logger'"},{"note":"Use type import only for type checking; pinoLogger is a function.","wrong":"import { pinoLogger } from 'hono-pino-logger'","symbol":"typeof pinoLogger","correct":"import type { pinoLogger } from 'hono-pino-logger'"}],"quickstart":{"code":"import { Hono } from 'hono'\nimport { pinoLogger } from 'hono-pino-logger'\n\nconst app = new Hono()\napp.use('*', pinoLogger())\napp.get('/', (c) => c.text('Hello'))\nexport default app","lang":"typescript","description":"Creates a Hono app with Pino logging for all routes using default logger."},"warnings":[{"fix":"Ensure hono version in package.json is >=4.0.0","message":"hono version must be >=4","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"npm install pino-pretty and configure pino accordingly","message":"pino-pretty not included; must be installed separately for pretty-printing","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Call app.use('*', pinoLogger()) before registering routes","message":"Logger must be attached before route handlers to log requests","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install hono-pino-logger' and check spelling","cause":"Package not installed or typo in package name","error":"Error: Cannot find module 'hono-pino-logger'"},{"fix":"Use '{ pinoLogger }' in import statement","cause":"Using default import instead of named import","error":"TypeError: pinoLogger is not a function"},{"fix":"Update hono: npm install hono@latest","cause":"Installed hono version is lower than 4","error":"Error: hono must be version >=4"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}