try logging posts differently

This commit is contained in:
Andre Medeiros 2022-05-26 18:44:07 -04:00
parent e7faf73834
commit be343deab8

View file

@ -6,6 +6,7 @@ import (
"os" "os"
"sort" "sort"
"strconv" "strconv"
"strings"
"time" "time"
"github.com/DataDog/datadog-go/statsd" "github.com/DataDog/datadog-go/statsd"
@ -214,7 +215,7 @@ func (tc *trendingConsumer) Consume(delivery rmq.Delivery) {
tc.logger.Info("calculated median score", tc.logger.Info("calculated median score",
zap.Int64("subreddit#id", id), zap.Int64("subreddit#id", id),
zap.String("subreddit#name", subreddit.NormalizedName()), zap.String("subreddit#name", subreddit.NormalizedName()),
zap.Strings("subreddit#posts", posts), zap.String("subreddit#posts", strings.Join(posts, "\n")),
zap.Int64("score", medianScore), zap.Int64("score", medianScore),
) )