pinojs / pino-http

🌲 high-speed HTTP logger for Node.js
MIT License
527 stars 117 forks source link

Broken with h3 #335

Closed jolo-dev closed 4 months ago

jolo-dev commented 4 months ago

It seems that it does not work with h3.

I have reproduced the error, and I followed the instructions from the docs

https://stackblitz.com/edit/github-9quron?file=app.ts

mcollina commented 4 months ago

Thanks for reporting. Apparently h3 does not use a connect/express style of middleware, as you can see in https://h3.unjs.io/guide/app#registering-event-handlers.

Therefore, h3 is not supported by its module.

jolo-dev commented 4 months ago

@mcollina thanks for the reply. It also means then that we need to remove that from the documentation, right? https://getpino.io/#/docs/web?id=pino-with-h3

jsumners commented 4 months ago

It was added 2 years ago https://github.com/pinojs/pino/pull/1385. Likely something has changed. A PR to remove or update it to a working example would be welcome.

mcollina commented 4 months ago

Here is it: https://github.com/pinojs/pino/pull/1968.