refactor: prefer logrus.WithField over WithFields with a single param (#3087)

This commit is contained in:
mmetc 2024-06-20 10:38:23 +02:00 committed by GitHub
parent 4521a98ecc
commit 659774fd3d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 57 additions and 150 deletions

View file

@ -149,9 +149,7 @@ func TestStreamingAcquisition(t *testing.T) {
},
}
subLogger := log.WithFields(log.Fields{
"type": "kafka",
})
subLogger := log.WithField("type", "kafka")
createTopic("crowdsecplaintext", "localhost:9092")
@ -222,9 +220,7 @@ func TestStreamingAcquisitionWithSSL(t *testing.T) {
},
}
subLogger := log.WithFields(log.Fields{
"type": "kafka",
})
subLogger := log.WithField("type", "kafka")
createTopic("crowdsecssl", "localhost:9092")