From 1dd4a113a6e1d4b4e92fea2b19805c50c6f990c2 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Sat, 23 Sep 2017 09:16:14 -0700 Subject: [PATCH] cleaning up logging a smidge --- ODClient/odClient.go | 11 ++++------- goRicochetMobile.go | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ODClient/odClient.go b/ODClient/odClient.go index d30eb9c..4bda4f2 100644 --- a/ODClient/odClient.go +++ b/ODClient/odClient.go @@ -50,7 +50,7 @@ func (odClient *ODClient) Connect(privateKeyData string, serverAddr string) erro return err } log.Println("ODCleint connected!") - log.Println("starting auth...") + log.Println("Starting auth...") known, err := connection.HandleOutboundConnection(odClient.connection).ProcessAuthAsClient(privateKey) if err != nil { log.Println("Error handling auth: %v", err) @@ -58,13 +58,12 @@ func (odClient *ODClient) Connect(privateKeyData string, serverAddr string) erro } log.Println("go Process") - // TODO: end with breakChannel go odClient.connection.Process(odClient) if !known { err := odClient.connection.RequestOpenChannel("im.ricochet.contact.request", odClient) if err != nil { - log.Printf("could not contact %s", err) + log.Printf("Could not auth with server", err) } } @@ -76,9 +75,7 @@ func (odClient *ODClient) Connect(privateKeyData string, serverAddr string) erro log.Println("Error: " + err.Error()) } - //log.Println("sending greeting message") - //odClient.SendMessage("hello from the client") - + log.Println("Connection fully initiated, chat channel open!") return nil } @@ -128,7 +125,7 @@ func (odClient *ODClient) GetMessage() string { // ChatMessage passes the response to recvMessages. func (odc *ODClient) ChatMessage(messageID uint32, when time.Time, message string) bool { - log.Printf("Received Message: %s", message) + //log.Printf("Received Message: %s", message) odc.recvMessages <- message return true } diff --git a/goRicochetMobile.go b/goRicochetMobile.go index bfbbbe6..c3eded8 100644 --- a/goRicochetMobile.go +++ b/goRicochetMobile.go @@ -39,7 +39,7 @@ func GetOnionAddress(privateKey string) string { } func ODClientConnect(privateKey string, serverAddr string) error { - log.Println("ODClientConnect(" + serverAddr + ")") + log.Println("ODClientConnect()") odClient = new(ODClient.ODClient) err := odClient.Connect(privateKey, serverAddr) return err