pino-http icon indicating copy to clipboard operation
pino-http copied to clipboard

Explainer diagram of log formatting flow?

Open jpage-godaddy opened this issue 1 month ago • 0 comments

Hello. I have a documentation suggestion. One thing that's not clear to me is the sequence and data flow of all of the custom logging settings. I'm wanting to do some Elastic Common Schema conformant logging, but it's not clear to me how everything ties together. A flow chart could do wonders! Examples of my doubts at a first reading of the docs:

  • Is genReqId called in all cases, even when customReceivedObject isn't present?
  • Do customSuccessObject and customErrorObject receive the object produced by customReceivedObject, or would I need to duplicate property extraction logic? Or does customReceivedObject change the request being passed to those functions?
  • Does customProps inject properties into the custom objects produced by custom*Object or do those functions supercede those?

I might try to source dive to figure this out myself, but maybe there's already a good explanation somewhere that could be better surfaced?

jpage-godaddy avatar May 29 '24 18:05 jpage-godaddy