logstash/lib/bootstrap/rspec.rb
Jordan Sissel 39e0ef5783 Allow Logstash to write its logs in JSON format
This is made available by a --log-in-json flag. Default is false.
When false, the old behavior [1] is used.

When true, JSON logs are emitted.

[1] The old behavior is realy two things. First, using Object#inspect to
serialize. Second, to color the output if the IO is a tty.

For #1569

This is a manual backport of PR #4820 into the 2.x branch.

Fixes #5277
2016-05-10 19:21:21 +00:00

13 lines
381 B
Ruby
Executable file

# encoding: utf-8
require_relative "environment"
LogStash::Bundler.setup!({:without => [:build]})
require "logstash/environment"
$LOAD_PATH.unshift(File.join(LogStash::Environment::LOGSTASH_CORE, "spec"))
require "rspec/core"
require "rspec"
require 'ci/reporter/rake/rspec_loader'
status = RSpec::Core::Runner.run(ARGV.empty? ? ["spec"] : ARGV).to_i
exit status if status != 0