func (*suite) TestDumpRequest(c *gc.C) { for i, test := range dumpRequestTests { c.Logf("test %d; %#v", i, test.hdr) data := jsoncodec.DumpRequest(&test.hdr, test.body) c.Check(string(data), gc.Equals, test.expect) } }
func (n *requestNotifier) ServerRequest(hdr *rpc.Header, body interface{}) { if hdr.Request.Type == "Pinger" && hdr.Request.Action == "Ping" { return } // TODO(rog) 2013-10-11 remove secrets from some requests. logger.Debugf("<- [%X] %s %s", n.id, n.tag(), jsoncodec.DumpRequest(hdr, body)) }
func (n *requestNotifier) ServerReply(req rpc.Request, hdr *rpc.Header, body interface{}, timeSpent time.Duration) { if req.Type == "Pinger" && req.Action == "Ping" { return } logger.Debugf("-> [%X] %s %s %s %s[%q].%s", n.id, n.tag(), timeSpent, jsoncodec.DumpRequest(hdr, body), req.Type, req.Id, req.Action) }