From a45885fb3667eeff7f8109f09a8c21e7bd085bcb Mon Sep 17 00:00:00 2001 From: Henrik Oppen Date: Wed, 23 Nov 2022 15:44:24 +0100 Subject: [PATCH] POST-147: added logging of token length. --- go/api.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/go/api.go b/go/api.go index a6f5bf2..e09280a 100644 --- a/go/api.go +++ b/go/api.go @@ -320,6 +320,12 @@ func (c Client) FetchEvents(ctx context.Context, cursors []Cursor, pageSizeHint return err } + token := req.Header.Get("Authorization") + c.logger.WithFields(logrus.Fields{ + "event": "zeroeventhub.token_check", + "tokenLength": strconv.Itoa(len([]rune(token))), + }).Debug() + res, err := c.httpClient.Do(req) if err != nil { return err