From 80968d000ffd624a056e8e4dc9c0e0e472445526 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Wed, 25 Oct 2017 13:19:08 -0400 Subject: [PATCH] log panic traces via the usual logging mechanism --- irc/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irc/client.go b/irc/client.go index 1e29b76c..fd44c883 100644 --- a/irc/client.go +++ b/irc/client.go @@ -186,8 +186,8 @@ func (client *Client) run() { defer func() { if r := recover(); r != nil { - client.server.logger.Error("internal", fmt.Sprintf("Client caused panic, disconnecting: %v", r)) - debug.PrintStack() + client.server.logger.Error("internal", + fmt.Sprintf("Client caused panic, disconnecting: %v\n%s", r, debug.Stack())) } // ensure client connection gets closed client.destroy()