Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions fluent-bit/fluent-bit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ pipeline:
format: json_lines

- name: file
file: /data
match: '*.info'
path: /data
file: workshop-INFO.log
format: json_lines



format: json
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using format: json can lead to issues with log processing. This format outputs a single JSON array, which means the output file is only a valid JSON document once Fluent Bit is stopped and the closing bracket ] is written. If the process is interrupted, the entire log file may become invalid.

For better robustness and easier processing by log consumers, it's recommended to use format: json_lines. With json_lines, each log record is a separate, valid JSON object on its own line, which allows for incremental reading and processing of the log file.

      format: json_lines

Loading