Skip to content

Commit

Permalink
Enable debug=1 in json config
Browse files Browse the repository at this point in the history
Signed-off-by: Yuta Iwama <ganmacs@gmail.com>
  • Loading branch information
ganmacs committed May 31, 2019
1 parent 1636f0c commit bb6750f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/in_monitor_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class JSONConfigMonitorServlet < ConfigMonitorServlet
def process(req)
opts = build_option(req)
result = build_object(req, opts)
render_json(result)
render_json(result, opts)
end
end

Expand Down
12 changes: 12 additions & 0 deletions test/plugin/test_in_monitor_agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,18 @@ def get(uri, header = {})
assert_equal(["/etc/fluent/plugin"], res["plugin_dirs"])
assert_nil(res["log_path"])
end

test "/api/config.json?debug=1" do
d = create_driver("
@type monitor_agent
bind '127.0.0.1'
port #{@port}
tag monitor
")
d.instance.start
assert_true !get("http://127.0.0.1:#{@port}/api/config.json").body.include?("\n")
assert_true get("http://127.0.0.1:#{@port}/api/config.json?debug=1").body.include?("\n")
end
end

sub_test_case "check retry of buffered plugins" do
Expand Down

0 comments on commit bb6750f

Please sign in to comment.