Logging middleware in Hono
See example.js
-
Console (
console.log()
)import { logpost } from './logpost.js' app.use('*', logpost())
-
New Relic
import { logpost } from './logpost.js' app.use('*', logpost({ type: 'newrelic', newrelic: { region: 'us', key: '<API Key (INGEST - LICENSE)>', // "req" is "c.raw.req" body: async (req) => { return { timestamp: Date.now(), path: req.url.pathname, } } } }) )