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"
"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),
)