Skip to content

Commit

Permalink
Add message length to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Irvine committed Apr 11, 2017
1 parent b05537a commit d1f559f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/inputs/kafka_consumer/kafka_consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ func (k *Kafka) receiver() {
}
case msg := <-k.in:
if k.MaxMessageLen != 0 && len(msg.Value) > k.MaxMessageLen {
k.acc.AddError(fmt.Errorf("Message longer than max_message_len (%d)", k.MaxMessageLen))
k.acc.AddError(fmt.Errorf("Message longer than max_message_len (%d > %d)",
len(msg.Value), k.MaxMessageLen))
} else {
metrics, err := k.parser.Parse(msg.Value)
if err != nil {
Expand Down

0 comments on commit d1f559f

Please sign in to comment.