update deps
Some checks failed
build / test (push) Failing after 1m49s
codeql / analyze (go) (push) Failing after 2m6s
build / lint (push) Successful in 9m18s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-03-07 00:46:24 +03:00
parent 69dd8c4eea
commit d2ac0c1360
3 changed files with 36 additions and 55 deletions

View File

@@ -2,7 +2,6 @@ package kgo
import (
"context"
"fmt"
"github.com/twmb/franz-go/pkg/kgo"
"go.unistack.org/micro/v3/logger"
@@ -30,11 +29,7 @@ func (l *mlogger) Log(lvl kgo.LogLevel, msg string, args ...interface{}) {
return
}
if len(args) > 0 {
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])
}
l.l.Fields(fields).Log(l.ctx, mlvl, msg)
l.l.Log(l.ctx, mlvl, append([]interface{}{msg}, args...)...)
} else {
l.l.Log(l.ctx, mlvl, msg)
}