Remove commented logs

This commit is contained in:
Tulir Asokan 2023-07-16 00:57:09 +03:00
parent 14084b9832
commit f22d4f6ac8
4 changed files with 0 additions and 12 deletions

View file

@ -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)

View file

@ -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 {

View file

@ -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
}

View file

@ -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)
}