From 95a662b3e5893262a3a2aaf6ed74800363cd78bc Mon Sep 17 00:00:00 2001 From: xzchaoo Date: Tue, 23 Jan 2024 12:09:22 +0800 Subject: [PATCH] chore: add debug logs --- pkg/collectconfig/executor/consumer.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/collectconfig/executor/consumer.go b/pkg/collectconfig/executor/consumer.go index bbb55e9..7b3bc6f 100644 --- a/pkg/collectconfig/executor/consumer.go +++ b/pkg/collectconfig/executor/consumer.go @@ -381,6 +381,14 @@ func (c *Consumer) Consume(resp *logstream.ReadResponse, iw *inputWrapper, err e zap.Int("cost", int(resp.IOCost()/time.Millisecond)), // zap.Error(err), // ) + for _, line := range resp.Lines { + logger.Debugz("[consumer] [log] debug input", zap.String("key", c.key), zap.String("line", line)) + } + for _, g := range resp.LogGroups { + for _, log := range g.Logs { + logger.Debugz("[consumer] [log] debug input", zap.String("key", c.key), zap.Any("contents", log.Contents)) + } + } } }