From 6f5f0fc7f4d969795d2e8a94215df28e4d33dc13 Mon Sep 17 00:00:00 2001
From: jaketaylor <jake@privategrity.com>
Date: Mon, 27 Jan 2020 14:31:34 -0800
Subject: [PATCH] added some logs

---
 api/connect.go | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/api/connect.go b/api/connect.go
index 7aa07f40a..e6a4548fa 100644
--- a/api/connect.go
+++ b/api/connect.go
@@ -1,8 +1,15 @@
+////////////////////////////////////////////////////////////////////////////////
+// Copyright © 2020 Privategrity Corporation                                   /
+//                                                                             /
+// All rights reserved.                                                        /
+////////////////////////////////////////////////////////////////////////////////
+
 package api
 
 import (
 	"fmt"
 	"github.com/pkg/errors"
+	jww "github.com/spf13/jwalterweatherman"
 	"gitlab.com/elixxir/client/globals"
 	"gitlab.com/elixxir/client/io"
 	"gitlab.com/elixxir/comms/connect"
@@ -53,9 +60,8 @@ func (cl *Client) DisableTls() {
 	cl.receptionManager.Tls = false
 }
 
+// Begin client version checks via registration server
 func (cl *Client) setupPermissioning() error {
-	// Permissioning was found in ndf run corresponding code
-
 	//Get remote version and update
 	ver, err := cl.receptionManager.GetRemoteVersion()
 	if err != nil {
@@ -80,9 +86,9 @@ func (cl *Client) setupPermissioning() error {
 			return err
 		}
 		if !ok {
-			err = errors.New(fmt.Sprintf("Couldn't connect to gateways: Versions incompatible; Local version: %v; remote version: %v", globals.SEMVER,
-				cl.GetRegistrationVersion()))
-			return err
+			return errors.Errorf("Couldn't connect to gateways: Versions"+
+				" incompatible; Local version: %v; remote version: %v", globals.SEMVER,
+				cl.GetRegistrationVersion())
 		}
 	} else {
 		globals.Log.WARN.Printf("Not checking version from " +
@@ -90,6 +96,8 @@ func (cl *Client) setupPermissioning() error {
 			"access to the registration server?")
 	}
 
+	jww.DEBUG.Printf("Local version: %v; Remote version: %v",
+		globals.SEMVER, cl.GetRegistrationVersion())
 	return nil
 
 }
-- 
GitLab