Document and add support to input plugins for logging alias (#6357)

This commit is contained in:
Greg
2019-09-23 16:39:50 -06:00
committed by Daniel Nelson
parent e42d2e39c6
commit 817c9a69a9
111 changed files with 961 additions and 659 deletions

View File

@@ -3,7 +3,6 @@ package kinesis_consumer
import (
"context"
"fmt"
"log"
"math/big"
"strings"
"sync"
@@ -40,6 +39,8 @@ type (
DynamoDB *DynamoDB `toml:"checkpoint_dynamodb"`
MaxUndeliveredMessages int `toml:"max_undelivered_messages"`
Log telegraf.Logger
cons *consumer.Consumer
parser parsers.Parser
cancel context.CancelFunc
@@ -220,7 +221,7 @@ func (k *KinesisConsumer) connect(ac telegraf.Accumulator) error {
})
if err != nil {
k.cancel()
log.Printf("E! [inputs.kinesis_consumer] Scan encounterred an error - %s", err.Error())
k.Log.Errorf("Scan encounterred an error: %s", err.Error())
k.cons = nil
}
}()
@@ -285,7 +286,7 @@ func (k *KinesisConsumer) onDelivery(ctx context.Context) {
k.lastSeqNum = strToBint(sequenceNum)
k.checkpoint.Set(chk.streamName, chk.shardID, sequenceNum)
} else {
log.Println("D! [inputs.kinesis_consumer] Metric group failed to process")
k.Log.Debug("Metric group failed to process")
}
}
}