From be343deab8d658d25bbcb6dde11fcf34c97c4554 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Thu, 26 May 2022 18:44:07 -0400 Subject: [PATCH] try logging posts differently --- internal/worker/trending.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/worker/trending.go b/internal/worker/trending.go index 2629913..ee45d03 100644 --- a/internal/worker/trending.go +++ b/internal/worker/trending.go @@ -6,6 +6,7 @@ import ( "os" "sort" "strconv" + "strings" "time" "github.com/DataDog/datadog-go/statsd" @@ -214,7 +215,7 @@ func (tc *trendingConsumer) Consume(delivery rmq.Delivery) { tc.logger.Info("calculated median score", zap.Int64("subreddit#id", id), zap.String("subreddit#name", subreddit.NormalizedName()), - zap.Strings("subreddit#posts", posts), + zap.String("subreddit#posts", strings.Join(posts, "\n")), zap.Int64("score", medianScore), )