zap icon indicating copy to clipboard operation
zap copied to clipboard

ctx: store logger in context when missing or different that stored one

Open robsonpeixoto opened this issue 2 years ago • 2 comments

I really love the feature https://github.com/rs/zerolog/pull/81 because make easier implement features like this https://github.com/jackc/pgx/blob/cf0de913ee8facdfef0a7611d41cd67522b12c76/log/zerologadapter/adapter.go#L83-L92

robsonpeixoto avatar Jan 30 '22 19:01 robsonpeixoto

I really love the feature rs/zerolog#81 because make easier implement features like this https://github.com/jackc/pgx/blob/cf0de913ee8facdfef0a7611d41cd67522b12c76/log/zerologadapter/adapter.go#L83-L92

I encapsulated a zap package(https://github.com/wuhongbing/zapctx) to support context,you can try it. zapctx

lehoqi avatar Feb 17 '22 11:02 lehoqi

@lehoqi, would be amazing see this on the core project.

robsonpeixoto avatar Sep 20 '22 12:09 robsonpeixoto