소스 검색

Include original error value when reporting data loss where possible

Burke Libbey 13 년 전
부모
커밋
ed536f1ee5
1개의 변경된 파일과 1개의 추가작업 그리고 1개의 파일을 삭제
  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()