You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do something like httplog.LogEntrySetField(ctx, "step", step) and then oplog := httplog.LogEntry(ctx) to get the logger for that layer as the request goes through my app, with step being either "handler", "service" or "storage".
I kinda expected the method to override this field as the key name remains the same, but instead I just get step: "handler" step: "service" step: "storage" in logs.
What am I doing wrong?
Should I use LogEntrySetFields with a copy of the context as argument to "preserve" the original for the next layer? Doesn't seem to work based on a quick test, at least without some voodoo to build a copy from scratch.
The text was updated successfully, but these errors were encountered:
I do something like
httplog.LogEntrySetField(ctx, "step", step)
and thenoplog := httplog.LogEntry(ctx)
to get the logger for that layer as the request goes through my app, withstep
being either"handler"
,"service"
or"storage"
.I kinda expected the method to override this field as the key name remains the same, but instead I just get
step: "handler" step: "service" step: "storage"
in logs.What am I doing wrong?
Should I useDoesn't seem to work based on a quick test, at least without some voodoo to build a copy from scratch.LogEntrySetFields
with a copy of the context as argument to "preserve" the original for the next layer?The text was updated successfully, but these errors were encountered: