Prepend a prefix in every logs generated in the application #1290
Unanswered
meetme2meat
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I had set up the zap logger with following configuration
Help me understand if is it possible to prepend a prefix to every log message (DEBUG, INFO) something like what log library provides https://pkg.go.dev/log#SetPrefix
and the prefix is
"=>"
The final log line would appear like this
I tried with
log.With
API but it seems to create a new JSON object which is different from what I need.Beta Was this translation helpful? Give feedback.
All reactions