diff --git a/protocol/json/server.go b/protocol/json/server.go index e7e165d..dde8981 100644 --- a/protocol/json/server.go +++ b/protocol/json/server.go @@ -3,6 +3,7 @@ package json import ( "encoding/json" "io" + "log" "git.loafle.net/commons_go/rpc/encode" "git.loafle.net/commons_go/rpc/protocol" @@ -84,6 +85,7 @@ func newCodecRequest(r io.Reader, encoder encode.Encoder) protocol.CodecRequest // Decode the request body and check if RPC method is valid. req := new(serverRequest) err := json.NewDecoder(r).Decode(req) + log.Printf("NewRequest err: %v", err) if err != nil { err = &Error{ Code: E_PARSE, diff --git a/registry.go b/registry.go index dac9464..555df63 100644 --- a/registry.go +++ b/registry.go @@ -103,7 +103,7 @@ func (rr *rpcRegistry) Invoke(contentType string, r io.Reader, w io.Writer, befo // Create a new codec request. codecReq := codec.NewRequest(r) // Get service method to be called. - log.Print("codecReq.Method") + log.Printf("codecReq.Method: %v", codecReq) method, errMethod := codecReq.Method() if errMethod != nil { return write(codecReq, w, beforeWrite, afterWrite, nil, errMethod)