Merge pull request #1151 from GregMefford/docfix_json_lines

Doc-fix for json_lines codec
This commit is contained in:
Kurt Hurtado 2014-03-26 18:06:38 -07:00
commit 3e9df26af0
4 changed files with 13 additions and 6 deletions

View file

@ -21,13 +21,18 @@ This is what it might look like in your config file:
# with an input plugin:
# you can also use this codec with an output.
input {
file {
codec =&gt; <%= synopsis.split("\n").map { |l| " #{l}" }.join("\n") %>
<% if name == "json_lines" -%>
udp {
port =&gt; 1234
<% else -%>
file {
<% end -%>
codec =&gt; <%= synopsis -%>
}
}
<% else -%>
<%= section %> {
<%= synopsis %>
<%= synopsis -%>
}
<% end -%></code></pre>

View file

@ -19,6 +19,6 @@
end
annotation += ", default: #{config[:default].inspect}" if config.include?(:default)
-%>
<a href="#<%= name %>"><%= name %></a> => ... # <%= annotation %>
<%= " " if section == "codec" %> <a href="#<%= name %>"><%= name %></a> => ... # <%= annotation %>
<% end -%>
}
<%= " " if section == "codec" %> }

View file

@ -4,7 +4,8 @@ require "logstash/codecs/line"
require "json"
# This codec will decode streamed JSON that is newline delimited.
# For decoding JSON payload in the redis input for example, use the json codec instead.
# For decoding line-oriented JSON payload in the redis or file inputs,
# for example, use the json codec instead.
# Encoding will emit a single JSON string ending in a '\n'
class LogStash::Codecs::JSONLines < LogStash::Codecs::Base
config_name "json_lines"

View file

@ -102,6 +102,7 @@ Gem::Specification.new do |gem|
#Development Deps
gem.add_development_dependency "coveralls"
gem.add_development_dependency "bluecloth"
#Jenkins Deps
gem.add_runtime_dependency "ci_reporter"