Skip to content

Commit

Permalink
Add fields to logger on Close (#194)
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 cab1db9 commit dc4befd
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 @@ -229,6 +229,7 @@ func main() {

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

0 comments on commit dc4befd

Please sign in to comment.