Module: LogstashCli::Command
Instance Method Summary collapse
Methods included from Count
Methods included from Tail
Methods included from Grep
#_grep, indexes_from_interval, parse_time_range
Instance Method Details
#_format(result, options) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/logstash-cli/command.rb', line 11 def _format(result,) output = case [:format] when 'csv' then result.to_csv({:col_sep => [:delim]}) when 'json' then result.to_json when 'plain' then result.join([:delim]) end return output end |