Skip to content

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

@rkimmuta

Description

@rkimmuta

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions