From f4cc4b99facbee4d146db520b05d070672d94a0e Mon Sep 17 00:00:00 2001 From: Matthew Faltys Date: Fri, 29 Mar 2019 08:30:38 -0500 Subject: [PATCH] Add additional rng logging --- lorebot/lorebot.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lorebot/lorebot.go b/lorebot/lorebot.go index a869236..edc8b0e 100644 --- a/lorebot/lorebot.go +++ b/lorebot/lorebot.go @@ -429,15 +429,16 @@ func rnghandler(rtm *slack.RTM, ev *slack.MessageEvent, redisClient *redis.Clien // pick a random one rand.Seed(time.Now().UnixNano()) rngLore := fmt.Sprint(command[rand.Intn(len(command))]) - println(rngLore) + glogger.Debug.Printf("rng lore: %s\n", rngLore) // get lore content rngContent, err := loreCheck(rngLore, "lore", redisClient) if err != nil { - fmt.Printf("%v\n", err) + glogger.Error.Printf("%v\n", err) rtm.SendMessage(rtm.NewOutgoingMessage("beep boop.. broken bot..", ev.Channel)) return } + glogger.Debug.Printf("rng content: %s\n", rngContent) rngMsg := fmt.Sprintf("Random lore: `%s`\n%s", rngLore, rngContent) rtm.SendMessage(rtm.NewOutgoingMessage(rngMsg, ev.Channel)) }