mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 06:37:19 -04:00
Merge pull request #1151 from GregMefford/docfix_json_lines
Doc-fix for json_lines codec
This commit is contained in:
commit
3e9df26af0
4 changed files with 13 additions and 6 deletions
|
@ -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 => <%= synopsis.split("\n").map { |l| " #{l}" }.join("\n") %>
|
||||
<% if name == "json_lines" -%>
|
||||
udp {
|
||||
port => 1234
|
||||
<% else -%>
|
||||
file {
|
||||
<% end -%>
|
||||
codec => <%= synopsis -%>
|
||||
}
|
||||
}
|
||||
<% else -%>
|
||||
<%= section %> {
|
||||
<%= synopsis %>
|
||||
<%= synopsis -%>
|
||||
}
|
||||
<% end -%></code></pre>
|
||||
|
||||
|
|
|
@ -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" %> }
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue