Closed nerdpad closed 8 years ago
What version of good? If it's 6, you'll need to write a customer reporter.
If it's 7, you have a lot more options for how you can customize your event payloads. You can create your own transform stream and attach this "extra data" in _transform
before passing it down the pipeline.
I am using 6, and I was already using good-bunyan reporter, so I had to exclude response
, and handle it manually.
v7 just got released, so I will look into the transform, if that helps.
Thanks for the help.
I have nearly the exact same question - I want to log the user name and a tracking id for each request. I am also using v6.6 (of course, since v7 was only published yesterday). Are there release notes? What is the breaking change?
https://github.com/hapijs/good/issues/467 are the release notes.
If you are using good 6 and you want to customize your outputs, you're only real option is to roll your own reporter. If you want to read up on doing that, start here https://github.com/hapijs/good/blob/v6.6.3/API.md
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
For every request my server receives, I would like to log few extra fields (user, a tracking id passed in the header).
I am using good-bunyan, and have an option to write a formatter for
response
event.How can I customize the data that is passed to the reporter?