Skip to content

[question] How to access with fields inside a hook #493

Open
@vijayrajah

Description

@vijayrajah

I'm using a hook to write the logs to graylog using GELF client ( "gopkg.in/Graylog2/go-gelf.v2/gelf")

it appears that there is no way to access with fields

like

log.With().Str("k","v).Logger().Info().Msg("some message")

I want to add the k as extra field (with its value as v) in GELF message.

is there a way we can do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions