Skip to content

Commit

Permalink
Add log message when multline event flushed (#4375)
Browse files Browse the repository at this point in the history
So far there was no log message when an incomplete multiline event was flushed. The reason this log message is on a debug level is that at the end of a file if there is no next multiline event, the timeout can be reached rather often.
  • Loading branch information
ruflin authored and tsg committed May 26, 2017
1 parent 4ab7848 commit 5aa60d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions filebeat/harvester/reader/multiline.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"time"

"github.com/elastic/beats/libbeat/common/match"
"github.com/elastic/beats/libbeat/logp"
)

// MultiLine reader combining multiple line events into one multi-line event.
Expand Down Expand Up @@ -122,6 +123,8 @@ func (mlr *Multiline) readFirst() (Message, error) {
continue
}

logp.Debug("multiline", "Multiline event flushed because timeout reached.")

// pass error to caller (next layer) for handling
return message, err
}
Expand Down Expand Up @@ -149,6 +152,8 @@ func (mlr *Multiline) readNext() (Message, error) {
continue
}

logp.Debug("multiline", "Multiline event flushed because timeout reached.")

// return collected multiline event and
// empty buffer for new multiline event
msg := mlr.finalize()
Expand Down

0 comments on commit 5aa60d7

Please sign in to comment.