diff --git a/service_map.go b/service_map.go index f05d2ed..32c4623 100644 --- a/service_map.go +++ b/service_map.go @@ -2,6 +2,7 @@ package rpc import ( "fmt" + "log" "net/http" "reflect" "strings" @@ -62,6 +63,7 @@ func (m *serviceMap) register(rcvr interface{}, name string) error { return fmt.Errorf("rpc: no service name for type %q", s.rcvrType.String()) } + log.Printf("The name of service is %s", s.name) // Setup methods. for i := 0; i < s.rcvrType.NumMethod(); i++ { method := s.rcvrType.Method(i) @@ -101,6 +103,7 @@ func (m *serviceMap) register(rcvr interface{}, name string) error { argsType: args.Elem(), replyType: reply.Elem(), } + log.Printf("The name of service[%s] method is %s", s.name, method.Name) } if len(s.methods) == 0 { return fmt.Errorf("rpc: %q has no exported methods of suitable type",