Closed sfhardman closed 6 years ago
What specific problem is this trying to solve? What do you want out of request objects that you are missing?
In general, I've avoided exposing functions as arguments because you can't express that as JSON and a lot of people configure their hapi servers with JSON.
This was to allow the username to be in the logs - for me this is coming from request.auth.credentials.username
The previous issue (https://github.com/hapijs/good/pull/558) around getting authentication info into the event payloads was closed because the form of request.auth is not standardised.
👍
I also need a way to log request.auth.credentials.username
into the request logs. If possible, even more from request.auth.credentials
.
Is this being merged or closed?
My impression is it isn't going to be accepted, so I have switched to monkeypatching good/lib/utils instead
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.
The change is to allow users to extract extra data out of the Hapi request object and populate it into an 'extensionData' field on the event passed to reporters. My use case is for passing authentication information from request.auth (as per the example added to API.md), but it could be used for other edge cases people may have that are not worth specifically implementing in the core library.