hono-pino-logger
v1.0.0
Published
Pino logger middleware for Hono
Downloads
734
Maintainers
Readme
Pino logger middleware for Hono
This middleware integrates Hono with Pino.
Installation
npm i hono hono-pino-logger
How to Use
Default:
import { Hono } from "hono"
import { pinoLogger } from "hono-pino-logger"
const app = new Hono()
app.use('*', pinoLogger())
export default app
Custom:
import { Hono } from "hono"
import { pinoLogger } from "hono-pino-logger"
import pino from "pino"
const logger = pino({ level: "error" })
const app = new Hono()
app.use('*', pinoLogger(logger))
export default app
Authors
- Maksym Herasymov - https://github.com/maks-herasymov
License
MIT