From f22d4f6ac81f895665ac506221816a289f29dd26 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 16 Jul 2023 00:57:09 +0300 Subject: [PATCH] Remove commented logs --- libgm/event_handler.go | 4 ---- libgm/pair.go | 3 --- libgm/request.go | 3 --- libgm/rpc.go | 2 -- 4 files changed, 12 deletions(-) diff --git a/libgm/event_handler.go b/libgm/event_handler.go index 9aad0be..a96a0d9 100644 --- a/libgm/event_handler.go +++ b/libgm/event_handler.go @@ -48,16 +48,12 @@ func (r *RPC) HandleRPCMsg(msg *binary.InternalMessage) { r.client.Logger.Error().Err(decodeErr).Msg("rpc decrypt msg err") return } - //r.client.Logger.Debug().Any("byteLength", len(data)).Any("unmarshaled", response).Any("raw", string(data)).Msg("RPC Msg") if response == nil { r.client.Logger.Error().Msg("nil response in rpc handler") return } - //r.client.Logger.Debug().Any("response", response).Msg("decrypted & decoded response") _, waitingForResponse := r.client.sessionHandler.requests[response.Data.RequestId] - //r.client.Logger.Info().Any("raw", msgArr).Msg("Got msg") - //r.client.Logger.Debug().Any("waiting", waitingForResponse).Msg("got request! waiting?") r.client.sessionHandler.addResponseAck(response.ResponseId) if waitingForResponse { r.client.sessionHandler.respondToRequestChannel(response) diff --git a/libgm/pair.go b/libgm/pair.go index bb57fa1..13988cc 100644 --- a/libgm/pair.go +++ b/libgm/pair.go @@ -49,7 +49,6 @@ func (p *Pairer) RegisterPhoneRelay() (*binary.RegisterPhoneRelayResponse, error p.client.Logger.Err(err) return &binary.RegisterPhoneRelayResponse{}, err } - //p.client.Logger.Debug().Any("keyByteLength", len(jsonPayload.GetPairDeviceData().EcdsaKeys.EncryptedKeys)).Any("json", jsonPayload).Any("base64", body).Msg("RegisterPhoneRelay Payload") relayResponse, reqErr := p.client.MakeRelayRequest(util.REGISTER_PHONE_RELAY, body) if reqErr != nil { p.client.Logger.Err(reqErr) @@ -95,7 +94,6 @@ func (p *Pairer) RefreshPhoneRelay() { p.client.Logger.Err(err).Msg("refresh phone relay err") return } - //p.client.Logger.Debug().Any("keyByteLength", len(jsonPayload.PhoneRelay.tachyonAuthToken)).Any("json", jsonPayload).Any("base64", body).Msg("RefreshPhoneRelay Payload") relayResponse, reqErr := p.client.MakeRelayRequest(util.REFRESH_PHONE_RELAY, body) if reqErr != nil { p.client.Logger.Err(reqErr).Msg("refresh phone relay err") @@ -138,7 +136,6 @@ func (c *Client) GetWebEncryptionKey() (*binary.WebEncryptionKeyResponse, error) c.Logger.Err(err2).Msg("Web encryption key read response err") return nil, err2 } - //p.client.Logger.Debug().Any("responseLength", len(responseBody)).Any("raw", responseBody).Msg("Response Body Length") parsedResponse := &binary.WebEncryptionKeyResponse{} err2 = proto.Unmarshal(responseBody, parsedResponse) if err2 != nil { diff --git a/libgm/request.go b/libgm/request.go index 2acff52..b6c4de1 100644 --- a/libgm/request.go +++ b/libgm/request.go @@ -16,7 +16,6 @@ func (c *Client) PostRequest(url string, payload []byte, headers interface{}) (* reqHeaders := &http.Header{} SetHeaders(reqHeaders, headers) req.Header = *reqHeaders - //c.Logger.Info().Any("headers", req.Header).Msg("POST Request Headers") res, reqErr := c.http.Do(req) if reqErr != nil { return res, reqErr @@ -33,7 +32,6 @@ func (c *Client) GetRequest(url string, headers interface{}) (*http.Response, er reqHeaders := &http.Header{} SetHeaders(reqHeaders, headers) req.Header = *reqHeaders - //c.Logger.Info().Any("headers", req.Header).Msg("GET Request Headers") res, reqErr := c.http.Do(req) if reqErr != nil { return res, reqErr @@ -48,7 +46,6 @@ func (c *Client) MakeRelayRequest(url string, body []byte) (*http.Response, erro } util.BuildRelayHeaders(req, "application/x-protobuf", "*/*") res, reqErr := c.http.Do(req) - //c.Logger.Info().Any("bodyLength", len(body)).Any("url", url).Any("headers", res.Request.Header).Msg("Relay Request Headers") if reqErr != nil { return res, reqErr } diff --git a/libgm/rpc.go b/libgm/rpc.go index f6b3196..f30abb6 100644 --- a/libgm/rpc.go +++ b/libgm/rpc.go @@ -55,7 +55,6 @@ func (r *RPC) ListenReceiveMessages(payload []byte) { } util.BuildRelayHeaders(req, "application/json+protobuf", "*/*") resp, reqErr := r.http.Do(req) - //r.client.Logger.Info().Any("bodyLength", len(payload)).Any("url", util.RECEIVE_MESSAGES).Any("headers", resp.Request.Header).Msg("RPC Request Headers") if reqErr != nil { r.client.triggerEvent(&events.ListenTemporaryError{Error: reqErr}) errored = true @@ -190,7 +189,6 @@ func (r *RPC) sendMessageRequest(url string, payload []byte) (*http.Response, er } util.BuildRelayHeaders(req, "application/json+protobuf", "*/*") resp, reqErr := r.client.http.Do(req) - //r.client.Logger.Info().Any("bodyLength", len(payload)).Any("url", url).Any("headers", resp.Request.Header).Msg("RPC Request Headers") if reqErr != nil { return nil, fmt.Errorf("error making request: %w", err) }