From a64c2402d60b90cd0bdcb3fed56a56e3e5c47537 Mon Sep 17 00:00:00 2001 From: Douglas Thrift Date: Tue, 4 Jun 2024 09:18:05 -0700 Subject: [PATCH 1/2] Fix log cardinality in the set debug log for rmap --- rmap/map.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmap/map.go b/rmap/map.go index d52b4b0..3a62a59 100644 --- a/rmap/map.go +++ b/rmap/map.go @@ -496,7 +496,7 @@ func (sm *Map) run() { sm.logger.Debug("deleted", "key", key) default: sm.content[key] = val - sm.logger.Debug("set", key, val) + sm.logger.Debug("set", "key", key, "val", val) } select { case sm.ichan <- struct{}{}: From 596b379110e827f6e9e00ddaddc4e25ccc1c6ab3 Mon Sep 17 00:00:00 2001 From: Douglas Thrift Date: Tue, 4 Jun 2024 09:20:21 -0700 Subject: [PATCH 2/2] Fix test for rmap set debug log as well --- rmap/map_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rmap/map_test.go b/rmap/map_test.go index 2ac1aaf..ad36192 100644 --- a/rmap/map_test.go +++ b/rmap/map_test.go @@ -278,7 +278,7 @@ func TestLogs(t *testing.T) { // Check that the logs contain the expected messages assert.Contains(t, buf.String(), `joined`) - assert.Contains(t, buf.String(), `foo=bar`) + assert.Contains(t, buf.String(), `key=foo val=bar`) assert.Contains(t, buf.String(), `msg=deleted key=foo`) assert.Contains(t, buf.String(), `reset`) assert.Contains(t, buf.String(), `stopped`)