Skip to content

Commit

Permalink
Add fields to logger on Close (#119)
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
  • Loading branch information
glazychev-art authored May 17, 2021
1 parent 4f51b8d commit 8a7f7c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func main() {

defer func() {
closeCtx, cancel := context.WithTimeout(context.Background(), config.RequestTimeout)
closeCtx = log.WithFields(closeCtx, log.Fields(ctx))
defer cancel()
_, _ = c.Close(closeCtx, resp)
}()
Expand Down

0 comments on commit 8a7f7c2

Please sign in to comment.