Skip to content

Commit

Permalink
Reduce scope of variables in sendLogs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominik Rosiek committed Dec 1, 2020
1 parent 067ee06 commit be15195
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions exporter/sumologicexporter/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,14 @@ func (s *sender) sendLogs(flds fields) ([]pdata.LogRecord, error) {
errs []error
droppedRecords []pdata.LogRecord
currentRecords []pdata.LogRecord
formattedLine string
err error
)

for _, record := range s.buffer {
var (
formattedLine string
err error
)

switch s.config.LogFormat {
case TextFormat:
formattedLine, err = s.logToText(record)
Expand Down

0 comments on commit be15195

Please sign in to comment.