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
pino.fatal logs?process.report and do the right thing if it's presentcc @delvedor
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!