Skip to content

Add a prefix to the orpc/pino logs #1571

@maelp

Description

@maelp

Describe the feature

I'm using @orpc/experimental-pino plugin to get oRPC context in Pino.
In my logs, I'd like to prefix the message with the name of the current oRPC method, eg

[path.myMethod] My log

right now it doesn't seem to be feasible directly from pino, because it needs modifying the plugin. Could we add an option to add this feature on the experimental-pino plugin? eg some kind of pinoPlugin({prefix: (ctx) => [{ctx.method}]})

Additional information

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions