Skip to content

Commit bf9bf86

Browse files
authored
Fix rmap set debug log cardinality (#17)
* Fix log cardinality in the set debug log for rmap * Fix test for rmap set debug log as well
1 parent 3c9387e commit bf9bf86

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

rmap/map.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ func (sm *Map) run() {
496496
sm.logger.Debug("deleted", "key", key)
497497
default:
498498
sm.content[key] = val
499-
sm.logger.Debug("set", key, val)
499+
sm.logger.Debug("set", "key", key, "val", val)
500500
}
501501
select {
502502
case sm.ichan <- struct{}{}:

rmap/map_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ func TestLogs(t *testing.T) {
278278

279279
// Check that the logs contain the expected messages
280280
assert.Contains(t, buf.String(), `joined`)
281-
assert.Contains(t, buf.String(), `foo=bar`)
281+
assert.Contains(t, buf.String(), `key=foo val=bar`)
282282
assert.Contains(t, buf.String(), `msg=deleted key=foo`)
283283
assert.Contains(t, buf.String(), `reset`)
284284
assert.Contains(t, buf.String(), `stopped`)

0 commit comments

Comments
 (0)