From 4fcbe0a7705008ab93b6670d1e55a40f59f28715 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Thu, 15 Feb 2024 10:44:59 +0300 Subject: [PATCH] change log fields Signed-off-by: Vasiliy Tolstov --- logger.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logger.go b/logger.go index 5412a72..73f8796 100644 --- a/logger.go +++ b/logger.go @@ -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]) }