Sha256: ee3358fc8f5fc15c650c9b9e22dec6d8633012d6dab88cdd9adfa6133ca31b0a

Contents?: true

Size: 516 Bytes

Versions: 4

Compression:

Stored size: 516 Bytes

Contents

require 'logstash-cli/command/grep'
require 'logstash-cli/command/tail'
require 'logstash-cli/command/count'

module LogstashCli
  module Command
    include Grep
    include Tail
    include Count

    def _format(result,options)
      output = case options[:format]
                 when 'csv' then result.to_csv({:col_sep => options[:delim]})
                 when 'json' then result.to_json
                 when 'plain' then result.join(options[:delim])
               end
      return output
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
logstash-cli-0.0.8 lib/logstash-cli/command.rb
logstash-cli-0.0.7 lib/logstash-cli/command.rb
logstash-cli-0.0.6 lib/logstash-cli/command.rb
logstash-cli-0.0.5 lib/logstash-cli/command.rb