Skip to content

Commit

Permalink
removed the array char for victorialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
mosajjal committed Feb 8, 2025
1 parent 3be623b commit a8f0d22
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/output/victorialogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (viConfig victoriaConfig) victoriaOutputWorker(_ context.Context) {
log.Infof("starting VictoriaOutput")
victoriaSkipped := metrics.GetOrRegisterCounter("victoriaSkipped", metrics.DefaultRegistry)

batch := "["
batch := ""
cnt := uint(0)

ticker := time.NewTicker(time.Second * 5)
Expand All @@ -150,7 +150,7 @@ func (viConfig victoriaConfig) victoriaOutputWorker(_ context.Context) {
batch += string(viConfig.outputMarshaller.Marshal(data))
batch += "\n"
if int(cnt%viConfig.VictoriaBatchSize) == div {
// remove the last ,
// remove the last new line
batch = strings.TrimSuffix(batch, "\n")
viConfig.sendBatch(batch, int(cnt))
// reset counters
Expand Down

0 comments on commit a8f0d22

Please sign in to comment.