diff --git a/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb index 8861cc015e..6a83075cc5 100644 --- a/lib/fluent/plugin/in_tail.rb +++ b/lib/fluent/plugin/in_tail.rb @@ -1064,7 +1064,11 @@ def read_lines(lines) if is_long_line @log.warn "received line length is longer than #{@max_line_size}" - @log.debug("skipped line: ") { convert(rbuf).chomp } + if @skip_current_line + @log.debug("The continuing line is finished. Finally discarded data: ") { convert(rbuf).chomp } + else + @log.debug("skipped line: ") { convert(rbuf).chomp } + end has_skipped_line = true @skip_current_line = false @skipping_current_line_bytesize = 0 @@ -1079,6 +1083,11 @@ def read_lines(lines) ) if is_long_current_line + @log.debug( + "The continuing current line length is longer than #{@max_line_size}." + + " The received data will be discarded until this line is finished." + + " Discarded data: " + ) { convert(@buffer).chomp } @skip_current_line = true @skipping_current_line_bytesize += @buffer.bytesize @buffer.clear