Pino: support the core report API in some way

Created on 13 Apr 2020  路  6Comments  路  Source: pinojs/pino

see https://nodejs.org/dist/latest-v12.x/docs/api/report.html

This shouldn't land until report comes out of experimental, but integrating with process.report.getReport() so that full reports can be logged in error scenarios might be a cool idea.

Considerations

  • should we do this?
  • is this a core feature?
  • should it only apply in certain scenarios, e.g could we auto attach it to pino.fatal logs?
  • report is opt-in via the command line flags, but should we also make an option for it or just check for process.report and do the right thing if it's present
  • is there a way to bubble this up so that it's also a useful fastify feature (maybe it's just a matter of documentation?)

cc @delvedor

enhancement v7

All 6 comments

I'd be okay with documentation that describes scenarios on how to use it and log it. But I'm not keen on forcing this with fatal logs. While the _recommendation_ is that the process exit on a fatal log, it is by no means a hard and fast rule. Plus, it looks like this report could possibly contain sensitive information. It should be very opt-in; the developer should have to do some work to get the output.

report is already out of experimental on 13.x: https://nodejs.org/dist/latest-v13.x/docs/api/report.html.

We can already work on this.

I think's just a matter of documentation.

We might want to include it in:
http://getpino.io/#/docs/api?id=pino-final.

I'm leaning towards docs as well, but maybe there's also an opportunity for an ecosystem module that captures, redacts, outputs - all as part of final (and we can link to that in the docs as well). Sort of a balance between informing and avoiding hand rolling

Sure.

Perfect!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grbr picture grbr  路  6Comments

davidmarkclements picture davidmarkclements  路  7Comments

ronag picture ronag  路  5Comments

yoshuawuyts picture yoshuawuyts  路  5Comments

callumlocke picture callumlocke  路  4Comments