Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PoC: json_array switch to use json array data format for HTTP request body #2973

Merged
merged 5 commits into from
May 7, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
strip() is removed from format_json_array
strip call has overhead. Setting add_newline false to json formatter in
configure is enough to remove \n from json formatter result.

Signed-off-by: Roman Geraskin <roman.n.geraskin@gmail.com>
  • Loading branch information
rgeraskin committed May 2, 2020
commit 3ad87972c92e5d4fc36a4d3b4b7d2a34c8f2a359
2 changes: 1 addition & 1 deletion lib/fluent/plugin/out_http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def format(tag, time, record)
end

def format_json_array(tag, time, record)
@formatter.format(tag, time, record).strip() << ","
@formatter.format(tag, time, record) << ","
end

def write(chunk)
Expand Down