Skip to content

Feature request: attach custom data to middleware logger #695

@rubenvereecken

Description

@rubenvereecken

The use case is quite simple. I'd like to attach some custom data to request logs, such as which user is associated with this request. This data is available on the req object, so all I'd need is an optional makeData parameter for makeMiddleware. This function would be invoked for each request so that custom data could be set for each request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: loggingIssues related to the googleapis/nodejs-logging-winston API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions