change log fields
Some checks failed
codeql / analyze (go) (pull_request) Has been cancelled
prbuild / test (pull_request) Has been cancelled
prbuild / lint (pull_request) Has been cancelled
autoapprove / autoapprove (pull_request) Has been cancelled
automerge / automerge (pull_request) Has been cancelled
dependabot-automerge / automerge (pull_request) Has been cancelled

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2024-02-15 10:44:59 +03:00
parent 28c9865121
commit 4fcbe0a770

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])
}