From dc9f42de8b7eb4e8d0b9462689dd2e9834a052ff Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Fri, 27 May 2022 09:51:59 -0400 Subject: [PATCH] be less noisy again --- internal/worker/trending.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/internal/worker/trending.go b/internal/worker/trending.go index 6e6babb..efdd0d8 100644 --- a/internal/worker/trending.go +++ b/internal/worker/trending.go @@ -7,7 +7,6 @@ import ( "os" "sort" "strconv" - "strings" "time" "github.com/DataDog/datadog-go/statsd" @@ -211,17 +210,11 @@ func (tc *trendingConsumer) Consume(delivery rmq.Delivery) { return tps.Children[i].Score > tps.Children[j].Score }) - posts := make([]string, tps.Count) - for i, post := range tps.Children { - posts[i] = fmt.Sprintf("%s: %d", post.Title, post.Score) - } - middlePost := tps.Count / 2 medianScore := tps.Children[middlePost].Score - tc.logger.Info("calculated median score", + tc.logger.Debug("calculated median score", zap.Int64("subreddit#id", id), zap.String("subreddit#name", subreddit.NormalizedName()), - zap.String("subreddit#posts", strings.Join(posts, "\n")), zap.Int64("score", medianScore), )