Merge pull request 'change log fields' (#129) from fix into v3
Some checks failed
build / test (push) Has been cancelled
build / lint (push) Has been cancelled
codeql / analyze (go) (push) Has been cancelled

Reviewed-on: #129
This commit is contained in:
Василий Толстов 2024-02-15 10:45:37 +03:00
commit 23f0ad0f2f

View File

@ -30,7 +30,7 @@ func (l *mlogger) Log(lvl kgo.LogLevel, msg string, args ...interface{}) {
return
}
if len(args) > 0 {
fields := make([]interface{}, len(args))
fields := make([]interface{}, 0, len(args))
for i := 0; i <= len(args)/2; i += 2 {
fields = append(fields, fmt.Sprintf("%v", args[i]), args[i+1])
}