Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to include request.route.path in the log? #189

Open
rkimmuta opened this issue Feb 11, 2025 · 0 comments
Open

Is there a way to include request.route.path in the log? #189

rkimmuta opened this issue Feb 11, 2025 · 0 comments

Comments

@rkimmuta
Copy link

Runtime

node.js

Runtime version

v18.20.4

Module version

12.1.0

Used with

hapi

Any other relevant information

No response

How can we help?

Is there a way to attach the route path to the log object? If not I can always place another hook on hapi to properly set the bindings before the hapi-pino on response hook is called, but that feels like a bit of a hack. If it's not supported, would it be acceptable to add either a callback for producing the object(along the lines of customRequestCompleteMessage) or with extending the object creation to support the route path?

The motivation for this is to simplify log aggregation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant