diff --git a/pkg/tools/log/grouplogger.go b/pkg/tools/log/grouplogger.go index 75efcad92..5516764cc 100644 --- a/pkg/tools/log/grouplogger.go +++ b/pkg/tools/log/grouplogger.go @@ -23,7 +23,8 @@ type groupLogger struct { loggers []Logger } -func newGroup(s ...Logger) Logger { +// Combine creates grouped logger from all provided loggers +func Combine(s ...Logger) Logger { return &groupLogger{loggers: s} } diff --git a/pkg/tools/log/logger.go b/pkg/tools/log/logger.go index 8a9b15093..e8ecd5501 100644 --- a/pkg/tools/log/logger.go +++ b/pkg/tools/log/logger.go @@ -73,7 +73,7 @@ func Join(ctx context.Context, log Logger) context.Context { // WithLog - creates new context with `log` inside func WithLog(ctx context.Context, log ...Logger) context.Context { - return context.WithValue(ctx, logKey, newGroup(log...)) + return context.WithValue(ctx, logKey, Combine(log...)) } // Fields - returns fields from context