Bläddra i källkod

Include original error value when reporting data loss where possible

Burke Libbey 12 år sedan
förälder
incheckning
ed536f1ee5
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      producer.go

+ 1 - 1
producer.go

@@ -336,7 +336,7 @@ func (bp *brokerProducer) flushRequest(p *Producer, prb produceRequestBuilder, e
 		// No sense in retrying; it'll just fail again. But what about all the other
 		// messages that weren't invalid? Really, this is a "shit's broke real good"
 		// scenario, so logging it and moving on is probably acceptable.
-		errorCb(fmt.Errorf("[DATA LOSS] EncodingError! Dropped %d messages.\n", len(prb)))
+		errorCb(fmt.Errorf("[DATA LOSS] EncodingError! Dropped %d messages: %s", len(prb), err.Error()))
 		return
 	default:
 		bp.Close()