How to add common custom fields to logs without having to specify for each log statement? #1294
Replies: 1 comment
-
As often happens, I found the solution just after posting the question.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to add some common fields(app running environment, region etc) which are available on application startup and won't change. Instead of adding the
env
andregion
for each log statement as follows, I would like to configure somehow while instantiatingzap.Logger
:Is there a way to configure common key-value pairs like this?
Beta Was this translation helpful? Give feedback.
All reactions