Merge pull request #36 from Clever/add-err-msg

Added error message for failed log written to file
This commit is contained in:
Xavi 2018-12-11 16:43:26 -08:00 committed by GitHub
commit a975ca3c3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -100,7 +100,7 @@ func (b *batcherManager) sendBatch(batcher *batcher, tag string) {
case PartialSendBatchError:
lg.ErrorD("send-batch", kv.M{"msg": e.Error()})
for _, line := range e.FailedMessages {
b.failedLogsFile.ErrorD("failed-log", kv.M{"log": line})
b.failedLogsFile.ErrorD("failed-log", kv.M{"log": line, "msg": e.Error()})
}
stats.Counter("batch-log-failures", len(e.FailedMessages))
case CatastrophicSendBatchError: