From 4aa024d843b081977304c0184e8c56c05d22c32f Mon Sep 17 00:00:00 2001 From: Anton Kaliaev Date: Wed, 12 Jul 2017 23:10:36 +0300 Subject: [PATCH] add more info to error messages --- pubsub/pubsub.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pubsub/pubsub.go b/pubsub/pubsub.go index 007f93f3..aec60bcc 100644 --- a/pubsub/pubsub.go +++ b/pubsub/pubsub.go @@ -26,6 +26,7 @@ package pubsub import ( "errors" + "fmt" cmn "github.com/tendermint/tmlibs/common" "github.com/tendermint/tmlibs/log" @@ -174,7 +175,7 @@ func (s *Server) PublishWithTags(msg interface{}, tags map[string]interface{}) e select { case s.cmds <- pubCmd: default: - s.Logger.Error("Server overflowed, dropping message...", "msg", msg) + s.Logger.Error("Server overflowed, dropping message...", "msg", msg, "tags", fmt.Sprintf("%v", tags)) return ErrorOverflow } case wait: @@ -297,7 +298,7 @@ func (state *state) send(msg interface{}, tags map[string]interface{}, slowClien select { case ch <- msg: default: - logger.Error("Client is busy, skipping...", "clientID", clientID) + logger.Error("Wanted to send a message, but the client is busy", "msg", msg, "tags", fmt.Sprintf("%v", tags), "clientID", clientID) } case wait: ch <- msg