File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -570,7 +570,8 @@ static int process_content(struct flb_tail_file *file, size_t *bytes)
570570 data = (char * )flb_skip_leading_zeros_simd (data , end , & processed_bytes );
571571 }
572572
573- if (ctx -> truncate_long_lines == FLB_TRUE ) {
573+ if (ctx -> truncate_long_lines == FLB_TRUE &&
574+ file -> buf_size >= ctx -> buf_max_size ) {
574575 /* Use buf_max_size as the truncation threshold */
575576 if (ctx -> buf_max_size > 0 ) {
576577 eff_max = ctx -> buf_max_size - 1 ;
@@ -585,8 +586,7 @@ static int process_content(struct flb_tail_file *file, size_t *bytes)
585586 }
586587
587588 nl = memchr (data , '\n' , window );
588- if (file -> buf_size >= ctx -> buf_max_size &&
589- nl == NULL && eff_max > 0 && dec_len >= eff_max ) {
589+ if (nl == NULL && eff_max > 0 && dec_len >= eff_max ) {
590590 if (file -> skip_next == FLB_TRUE ) {
591591 bytes_override = (original_len > 0 ) ? original_len : file -> buf_len ;
592592 goto truncation_end ;
You can’t perform that action at this time.
0 commit comments