summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/client.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/client.go b/client/client.go
index a11bf4e..a31334a 100644
--- a/client/client.go
+++ b/client/client.go
@@ -22,7 +22,11 @@ type (
func (c *Client) logError(err error) {
// Logs the error with the same level/verbosity as the error
- c.Logger.Inherit(err)
+ if c.Debug {
+ c.Logger.Inheritf(err, "\nwith stacktrace: %s\n", err.(*errors.Error).ErrorStack())
+ } else {
+ c.Logger.Inheritf(err, "")
+ }
}
func (c *Client) isLetsConnect() bool {