diff --git a/thrift/lib/go/thrift/header_server.go b/thrift/lib/go/thrift/header_server.go index 618adb12801..6763a89f5fb 100644 --- a/thrift/lib/go/thrift/header_server.go +++ b/thrift/lib/go/thrift/header_server.go @@ -83,7 +83,7 @@ func (p *headerServer) acceptLoop(ctx context.Context) error { go func(ctx context.Context, conn net.Conn) { ctx = p.connContext(ctx, conn) if err := p.processRequests(ctx, conn); err != nil { - p.log.Println("thrift: error processing request:", err) + p.log.Printf("error processing request from %s: %s", conn.RemoteAddr().String(), err) } }(ctx, conn) } diff --git a/thrift/lib/go/thrift/rocket_server_transport.go b/thrift/lib/go/thrift/rocket_server_transport.go index 387edfdc4f6..11fa624e7b5 100644 --- a/thrift/lib/go/thrift/rocket_server_transport.go +++ b/thrift/lib/go/thrift/rocket_server_transport.go @@ -107,28 +107,28 @@ func (r *rocketServerTransport) processRequests(ctx context.Context, conn net.Co processor := newRocketUpgradeProcessor(r.processor) headerProtocol, err := NewHeaderProtocol(conn) if err != nil { - r.log.Println("thrift: error constructing header protocol: ", err) + r.log.Printf("thrift: error constructing header protocol from %s: %s", conn.RemoteAddr().String(), err) return } if err := r.processHeaderRequest(ctx, headerProtocol, processor); err != nil { - r.log.Println("thrift: error processing request: ", err) + r.log.Printf("thrift: error processing request from %s: %s", conn.RemoteAddr().String(), err) return } if processor.upgraded { r.processRocketRequests(ctx, conn) } else { if err := r.processHeaderRequests(ctx, headerProtocol, processor); err != nil { - r.log.Println("thrift: error processing request: ", err) + r.log.Printf("thrift: error processing request from %s: %s", conn.RemoteAddr().String(), err) } } case TransportIDHeader: headerProtocol, err := NewHeaderProtocol(conn) if err != nil { - r.log.Println("thrift: error constructing header protocol: ", err) + r.log.Printf("thrift: error constructing header protocol from %s: %s", conn.RemoteAddr().String(), err) return } if err := r.processHeaderRequests(ctx, headerProtocol, r.processor); err != nil { - r.log.Println("thrift: error processing request: ", err) + r.log.Printf("thrift: error processing request from %s: %s", conn.RemoteAddr().String(), err) } } }