logstash-core 1.5.0.beta2-java → 1.5.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of logstash-core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/logstash-core.rb +2 -0
- data/lib/logstash/agent.rb +0 -41
- data/lib/logstash/config/config_ast.rb +62 -29
- data/lib/logstash/config/mixin.rb +3 -3
- data/lib/logstash/environment.rb +37 -100
- data/lib/logstash/event.rb +32 -20
- data/lib/logstash/filters/base.rb +20 -0
- data/lib/logstash/java_integration.rb +72 -18
- data/lib/logstash/namespace.rb +0 -3
- data/lib/logstash/outputs/base.rb +1 -1
- data/lib/logstash/patches/bundler.rb +20 -0
- data/lib/logstash/patches/rubygems.rb +37 -0
- data/lib/logstash/pipeline.rb +59 -39
- data/lib/logstash/runner.rb +4 -50
- data/lib/logstash/util.rb +0 -1
- data/lib/logstash/util/accessors.rb +6 -0
- data/lib/logstash/version.rb +1 -1
- data/locales/en.yml +5 -0
- data/logstash-core.gemspec +51 -0
- data/spec/core/conditionals_spec.rb +428 -0
- data/spec/core/config_mixin_spec.rb +99 -0
- data/spec/core/config_spec.rb +108 -0
- data/spec/core/environment_spec.rb +44 -0
- data/spec/core/event_spec.rb +473 -0
- data/spec/core/pipeline_spec.rb +198 -0
- data/spec/core/plugin_spec.rb +106 -0
- data/spec/core/runner_spec.rb +39 -0
- data/spec/core/timestamp_spec.rb +83 -0
- data/spec/filters/base_spec.rb +318 -0
- data/spec/inputs/base_spec.rb +13 -0
- data/spec/lib/logstash/bundler_spec.rb +120 -0
- data/spec/lib/logstash/java_integration_spec.rb +257 -0
- data/spec/logstash/agent_spec.rb +37 -0
- data/spec/outputs/base_spec.rb +47 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/util/accessors_spec.rb +215 -0
- data/spec/util/charset_spec.rb +74 -0
- data/spec/util/fieldeval_spec.rb +96 -0
- data/spec/util/gemfile_spec.rb +212 -0
- data/spec/util/json_spec.rb +97 -0
- data/spec/util/plugin_version_spec.rb +48 -0
- data/spec/util/retryable_spec.rb +145 -0
- data/spec/util_spec.rb +34 -0
- metadata +96 -253
- data/lib/logstash-event.rb +0 -2
- data/lib/logstash.rb +0 -4
- data/lib/logstash/JRUBY-PR1448.rb +0 -32
- data/lib/logstash/bundler.rb +0 -124
- data/lib/logstash/gemfile.rb +0 -175
- data/lib/logstash/pluginmanager.rb +0 -17
- data/lib/logstash/pluginmanager/install.rb +0 -112
- data/lib/logstash/pluginmanager/list.rb +0 -38
- data/lib/logstash/pluginmanager/main.rb +0 -22
- data/lib/logstash/pluginmanager/maven_tools_patch.rb +0 -12
- data/lib/logstash/pluginmanager/uninstall.rb +0 -49
- data/lib/logstash/pluginmanager/update.rb +0 -50
- data/lib/logstash/pluginmanager/util.rb +0 -88
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69a97d7d7b23b0e8c46eec7149ab4370f943d222
|
4
|
+
data.tar.gz: bab042c02f71ac9a9e7319cce8321e631553ab20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 18d78f1d0762674a720dc763c8843b74ca2c0af16c4321b9496e1636511ec2f79271e934c9f068e6bc92c0897d93d8306d9ce305d1fa63b8cd3386ce1fc0ee55
|
7
|
+
data.tar.gz: ff72f2f8ad1af596dbe4cf6c89b40b0ae52966d90e950e046dd1fdee4e1bdbc6b3fed1fe441252d524d631daaada7cf71e21d23093a6ca7b7f06c48d5f5d812e
|
data/lib/logstash/agent.rb
CHANGED
@@ -39,11 +39,6 @@ class LogStash::Agent < Clamp::Command
|
|
39
39
|
option ["-V", "--version"], :flag,
|
40
40
|
I18n.t("logstash.agent.flag.version")
|
41
41
|
|
42
|
-
option ["-p", "--pluginpath"] , "PATH",
|
43
|
-
I18n.t("logstash.agent.flag.pluginpath"),
|
44
|
-
:multivalued => true,
|
45
|
-
:attribute_name => :plugin_paths
|
46
|
-
|
47
42
|
option ["-t", "--configtest"], :flag,
|
48
43
|
I18n.t("logstash.agent.flag.configtest"),
|
49
44
|
:attribute_name => :config_test
|
@@ -172,7 +167,6 @@ class LogStash::Agent < Clamp::Command
|
|
172
167
|
|
173
168
|
if RUBY_PLATFORM == "java"
|
174
169
|
show_version_java
|
175
|
-
show_version_elasticsearch
|
176
170
|
end
|
177
171
|
|
178
172
|
if [:debug].include?(verbosity?) || debug?
|
@@ -190,13 +184,6 @@ class LogStash::Agent < Clamp::Command
|
|
190
184
|
puts RUBY_DESCRIPTION
|
191
185
|
end # def show_version_ruby
|
192
186
|
|
193
|
-
def show_version_elasticsearch
|
194
|
-
LogStash::Environment.load_elasticsearch_jars!
|
195
|
-
|
196
|
-
$stdout.write("Elasticsearch: ");
|
197
|
-
org.elasticsearch.Version::main([])
|
198
|
-
end # def show_version_elasticsearch
|
199
|
-
|
200
187
|
def show_version_java
|
201
188
|
properties = java.lang.System.getProperties
|
202
189
|
puts "java #{properties["java.version"]} (#{properties["java.vendor"]})"
|
@@ -215,7 +202,6 @@ class LogStash::Agent < Clamp::Command
|
|
215
202
|
# Log file stuff, plugin path checking, etc.
|
216
203
|
def configure
|
217
204
|
configure_logging(log_file)
|
218
|
-
configure_plugin_path(plugin_paths) if !plugin_paths.nil?
|
219
205
|
end # def configure
|
220
206
|
|
221
207
|
# Point logging at a specific path.
|
@@ -266,33 +252,6 @@ class LogStash::Agent < Clamp::Command
|
|
266
252
|
# http://jira.codehaus.org/browse/JRUBY-7003
|
267
253
|
end # def configure_logging
|
268
254
|
|
269
|
-
# Validate and add any paths to the list of locations
|
270
|
-
# logstash will look to find plugins.
|
271
|
-
def configure_plugin_path(paths)
|
272
|
-
# Append any plugin paths to the ruby search path
|
273
|
-
paths.each do |path|
|
274
|
-
# Verify the path exists
|
275
|
-
if !Dir.exists?(path)
|
276
|
-
warn(I18n.t("logstash.agent.configuration.plugin_path_missing",
|
277
|
-
:path => path))
|
278
|
-
|
279
|
-
end
|
280
|
-
|
281
|
-
# TODO(sissel): Verify the path looks like the correct form.
|
282
|
-
# aka, there must be file in path/logstash/{inputs,codecs,filters,outputs}/*.rb
|
283
|
-
plugin_glob = File.join(path, "logstash", "{inputs,codecs,filters,outputs}", "*.rb")
|
284
|
-
if Dir.glob(plugin_glob).empty?
|
285
|
-
@logger.warn(I18n.t("logstash.agent.configuration.no_plugins_found",
|
286
|
-
:path => path, :plugin_glob => plugin_glob))
|
287
|
-
end
|
288
|
-
|
289
|
-
# We push plugin paths to the front of the LOAD_PATH so that folks
|
290
|
-
# can override any core logstash plugins if they need to.
|
291
|
-
@logger.debug("Adding plugin path", :path => path)
|
292
|
-
$LOAD_PATH.unshift(path)
|
293
|
-
end
|
294
|
-
end # def configure_plugin_path
|
295
|
-
|
296
255
|
def load_config(path)
|
297
256
|
begin
|
298
257
|
uri = URI.parse(path)
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'logstash/errors'
|
3
3
|
require "treetop"
|
4
|
+
|
4
5
|
class Treetop::Runtime::SyntaxNode
|
6
|
+
|
5
7
|
def compile
|
6
8
|
return "" if elements.nil?
|
7
9
|
return elements.collect(&:compile).reject(&:empty?).join("")
|
@@ -55,11 +57,31 @@ class Treetop::Runtime::SyntaxNode
|
|
55
57
|
end
|
56
58
|
end
|
57
59
|
|
60
|
+
|
58
61
|
module LogStash; module Config; module AST
|
62
|
+
|
63
|
+
def self.defered_conditionals=(val)
|
64
|
+
@defered_conditionals = val
|
65
|
+
end
|
66
|
+
|
67
|
+
def self.defered_conditionals
|
68
|
+
@defered_conditionals
|
69
|
+
end
|
70
|
+
|
71
|
+
def self.defered_conditionals_index
|
72
|
+
@defered_conditionals_index
|
73
|
+
end
|
74
|
+
|
75
|
+
def self.defered_conditionals_index=(val)
|
76
|
+
@defered_conditionals_index = val
|
77
|
+
end
|
78
|
+
|
59
79
|
class Node < Treetop::Runtime::SyntaxNode; end
|
60
80
|
|
61
81
|
class Config < Node
|
62
82
|
def compile
|
83
|
+
LogStash::Config::AST.defered_conditionals = []
|
84
|
+
LogStash::Config::AST.defered_conditionals_index = 0
|
63
85
|
code = []
|
64
86
|
|
65
87
|
code << <<-CODE
|
@@ -81,20 +103,22 @@ module LogStash; module Config; module AST
|
|
81
103
|
["filter", "output"].each do |type|
|
82
104
|
# defines @filter_func and @output_func
|
83
105
|
|
84
|
-
definitions << "
|
85
|
-
definitions << " events = [event]"
|
106
|
+
definitions << "def #{type}_func(event)"
|
107
|
+
definitions << " events = [event]" if type == "filter"
|
86
108
|
definitions << " @logger.debug? && @logger.debug(\"#{type} received\", :event => event.to_hash)"
|
109
|
+
|
87
110
|
sections.select { |s| s.plugin_type.text_value == type }.each do |s|
|
88
111
|
definitions << s.compile.split("\n", -1).map { |e| " #{e}" }
|
89
112
|
end
|
90
113
|
|
91
|
-
if type == "filter"
|
92
|
-
definitions << " events.flatten.each{|e| block.call(e) }"
|
93
|
-
end
|
114
|
+
definitions << " events" if type == "filter"
|
94
115
|
definitions << "end"
|
95
116
|
end
|
96
117
|
|
97
118
|
code += definitions.join("\n").split("\n", -1).collect { |l| " #{l}" }
|
119
|
+
|
120
|
+
code += LogStash::Config::AST.defered_conditionals
|
121
|
+
|
98
122
|
return code.join("\n")
|
99
123
|
end
|
100
124
|
end
|
@@ -125,20 +149,15 @@ module LogStash; module Config; module AST
|
|
125
149
|
#{name}_flush = lambda do |options, &block|
|
126
150
|
@logger.debug? && @logger.debug(\"Flushing\", :plugin => #{name})
|
127
151
|
|
128
|
-
|
152
|
+
events = #{name}.flush(options)
|
129
153
|
|
130
|
-
return if
|
154
|
+
return if events.nil? || events.empty?
|
131
155
|
|
132
|
-
|
133
|
-
@logger.debug? && @logger.debug(\"Flushing\", :plugin => #{name}, :event => event)
|
156
|
+
@logger.debug? && @logger.debug(\"Flushing\", :plugin => #{name}, :events => events)
|
134
157
|
|
135
|
-
|
136
|
-
#{plugin.compile_starting_here.gsub(/^/, " ")}
|
137
|
-
|
138
|
-
block.call(event)
|
139
|
-
events.flatten.each{|e| block.call(e) if e != event}
|
140
|
-
end
|
158
|
+
#{plugin.compile_starting_here.gsub(/^/, " ")}
|
141
159
|
|
160
|
+
events.each{|e| block.call(e)}
|
142
161
|
end
|
143
162
|
|
144
163
|
if #{name}.respond_to?(:flush)
|
@@ -211,13 +230,7 @@ module LogStash; module Config; module AST
|
|
211
230
|
return "start_input(#{variable_name})"
|
212
231
|
when "filter"
|
213
232
|
return <<-CODE
|
214
|
-
events = events
|
215
|
-
next [] if event.cancelled?
|
216
|
-
|
217
|
-
new_events = []
|
218
|
-
#{variable_name}.filter(event){|new_event| new_events << new_event}
|
219
|
-
event.cancelled? ? new_events : new_events.unshift(event)
|
220
|
-
end
|
233
|
+
events = #{variable_name}.multi_filter(events)
|
221
234
|
CODE
|
222
235
|
when "output"
|
223
236
|
return "#{variable_name}.handle(event)\n"
|
@@ -287,7 +300,7 @@ module LogStash; module Config; module AST
|
|
287
300
|
|
288
301
|
module Unicode
|
289
302
|
def self.wrap(text)
|
290
|
-
return "(" + text.
|
303
|
+
return "(" + text.force_encoding(Encoding::UTF_8).inspect + ")"
|
291
304
|
end
|
292
305
|
end
|
293
306
|
|
@@ -364,18 +377,38 @@ module LogStash; module Config; module AST
|
|
364
377
|
# at the end, events is returned to handle the case where no branch match and no branch code is executed
|
365
378
|
# so we must make sure to return the current event.
|
366
379
|
|
367
|
-
|
368
|
-
|
369
|
-
|
380
|
+
type = recursive_select_parent(PluginSection).first.plugin_type.text_value
|
381
|
+
|
382
|
+
if type == "filter"
|
383
|
+
i = LogStash::Config::AST.defered_conditionals_index += 1
|
384
|
+
source = <<-CODE
|
385
|
+
def cond_func_#{i}(input_events)
|
386
|
+
result = []
|
387
|
+
input_events.each do |event|
|
388
|
+
events = [event]
|
389
|
+
#{super}
|
390
|
+
end
|
391
|
+
result += events
|
392
|
+
end
|
393
|
+
result
|
394
|
+
end
|
395
|
+
CODE
|
396
|
+
LogStash::Config::AST.defered_conditionals << source
|
397
|
+
|
398
|
+
<<-CODE
|
399
|
+
events = cond_func_#{i}(events)
|
400
|
+
CODE
|
401
|
+
else
|
402
|
+
<<-CODE
|
370
403
|
#{super}
|
371
404
|
end
|
372
|
-
|
373
|
-
|
374
|
-
CODE
|
405
|
+
CODE
|
406
|
+
end
|
375
407
|
end
|
376
408
|
end
|
377
409
|
|
378
410
|
class BranchEntry < Node; end
|
411
|
+
|
379
412
|
class If < BranchEntry
|
380
413
|
def compile
|
381
414
|
children = recursive_inject { |e| e.is_a?(Branch) || e.is_a?(Plugin) }
|
@@ -137,7 +137,7 @@ module LogStash::Config::Mixin
|
|
137
137
|
# inside the gemspec.
|
138
138
|
def milestone(m = nil)
|
139
139
|
@logger = Cabin::Channel.get(LogStash)
|
140
|
-
@logger.
|
140
|
+
@logger.warn(I18n.t('logstash.plugin.deprecated_milestone', :plugin => config_name))
|
141
141
|
end
|
142
142
|
|
143
143
|
# Define a new configuration setting
|
@@ -451,7 +451,7 @@ module LogStash::Config::Mixin
|
|
451
451
|
return false, "Expected password (one value), got #{value.size} values?"
|
452
452
|
end
|
453
453
|
|
454
|
-
result = ::LogStash::Util::Password.new(value.first)
|
454
|
+
result = value.first.is_a?(::LogStash::Util::Password) ? value.first : ::LogStash::Util::Password.new(value.first)
|
455
455
|
when :path
|
456
456
|
if value.size > 1 # Only 1 value wanted
|
457
457
|
return false, "Expected path (one value), got #{value.size} values?"
|
@@ -472,7 +472,7 @@ module LogStash::Config::Mixin
|
|
472
472
|
bytes = Integer(value.first) rescue nil
|
473
473
|
result = bytes || Filesize.from(value.first).to_i
|
474
474
|
rescue ArgumentError
|
475
|
-
return false, "Unparseable filesize: #{value.first}. possible units (KiB, MiB, ...) e.g. '10 KiB'. doc reference: http://www.
|
475
|
+
return false, "Unparseable filesize: #{value.first}. possible units (KiB, MiB, ...) e.g. '10 KiB'. doc reference: http://www.elastic.co/guide/en/logstash/current/configuration.html#bytes"
|
476
476
|
end
|
477
477
|
else
|
478
478
|
return false, "Unknown validator symbol #{validator}"
|
data/lib/logstash/environment.rb
CHANGED
@@ -1,78 +1,19 @@
|
|
1
1
|
require "logstash/errors"
|
2
|
-
require
|
3
|
-
|
4
|
-
# monkey patch RubyGems to silence ffi warnings:
|
5
|
-
#
|
6
|
-
# WARN: Unresolved specs during Gem::Specification.reset:
|
7
|
-
# ffi (>= 0)
|
8
|
-
# WARN: Clearing out unresolved specs.
|
9
|
-
# Please report a bug if this causes problems.
|
10
|
-
#
|
11
|
-
# see https://github.com/elasticsearch/logstash/issues/2556 and https://github.com/rubygems/rubygems/issues/1070
|
12
|
-
#
|
13
|
-
# this code is from Rubygems v2.1.9 in JRuby 1.7.17. Per tickets this issue should be solved at JRuby >= 1.7.20.
|
14
|
-
|
15
|
-
# this method implementation works for Rubygems version 2.1.0 and up, verified up to 2.4.6
|
16
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new("2.1.0") && Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.5.0")
|
17
|
-
class Gem::Specification
|
18
|
-
def self.reset
|
19
|
-
@@dirs = nil
|
20
|
-
Gem.pre_reset_hooks.each { |hook| hook.call }
|
21
|
-
@@all = nil
|
22
|
-
@@stubs = nil
|
23
|
-
_clear_load_cache
|
24
|
-
unresolved = unresolved_deps
|
25
|
-
unless unresolved.empty?
|
26
|
-
unless (unresolved.size == 1 && unresolved["ffi"])
|
27
|
-
w = "W" + "ARN"
|
28
|
-
warn "#{w}: Unresolved specs during Gem::Specification.reset:"
|
29
|
-
unresolved.values.each do |dep|
|
30
|
-
warn " #{dep}"
|
31
|
-
end
|
32
|
-
warn "#{w}: Clearing out unresolved specs."
|
33
|
-
warn "Please report a bug if this causes problems."
|
34
|
-
end
|
35
|
-
unresolved.clear
|
36
|
-
end
|
37
|
-
Gem.post_reset_hooks.each { |hook| hook.call }
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
2
|
+
require "logstash/version"
|
41
3
|
|
42
4
|
module LogStash
|
43
5
|
module Environment
|
44
6
|
extend self
|
45
7
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
BUNDLE_CONFIG_PATH = ::File.join(LOGSTASH_HOME, ".bundle", "config")
|
52
|
-
BOOTSTRAP_GEM_PATH = ::File.join(LOGSTASH_HOME, 'build', 'bootstrap')
|
53
|
-
|
54
|
-
LOGSTASH_ENV = (ENV["LS_ENV"] || 'production').to_s.freeze
|
55
|
-
|
56
|
-
# loads currently embedded elasticsearch jars
|
57
|
-
# @raise LogStash::EnvironmentError if not running under JRuby or if no jar files are found
|
58
|
-
def load_elasticsearch_jars!
|
59
|
-
raise(LogStash::EnvironmentError, "JRuby is required") unless jruby?
|
60
|
-
|
61
|
-
require "java"
|
62
|
-
jars_path = ::File.join(ELASTICSEARCH_DIR, "**", "*.jar")
|
63
|
-
jar_files = Dir.glob(jars_path)
|
64
|
-
|
65
|
-
raise(LogStash::EnvironmentError, "Could not find Elasticsearch jar files under #{ELASTICSEARCH_DIR}") if jar_files.empty?
|
66
|
-
|
67
|
-
jar_files.each do |jar|
|
68
|
-
loaded = require jar
|
69
|
-
puts("Loaded #{jar}") if $DEBUG && loaded
|
70
|
-
end
|
8
|
+
# rehydrate the bootstrap environment if the startup was not done by executing bootstrap.rb
|
9
|
+
# and we are in the context of the logstash package
|
10
|
+
if !LogStash::Environment.const_defined?("LOGSTASH_HOME") && !ENV["LOGSTASH_HOME"].to_s.empty?
|
11
|
+
$LOAD_PATH << ::File.join(ENV["LOGSTASH_HOME"], "lib")
|
12
|
+
require "bootstrap/environment"
|
71
13
|
end
|
72
14
|
|
73
|
-
|
74
|
-
|
75
|
-
end
|
15
|
+
LOGSTASH_CORE = ::File.expand_path(::File.join(::File.dirname(__FILE__), "..", ".."))
|
16
|
+
LOGSTASH_ENV = (ENV["LS_ENV"] || 'production').to_s.freeze
|
76
17
|
|
77
18
|
def env
|
78
19
|
LOGSTASH_ENV
|
@@ -90,45 +31,45 @@ module LogStash
|
|
90
31
|
env.downcase == "test"
|
91
32
|
end
|
92
33
|
|
93
|
-
def
|
94
|
-
|
95
|
-
|
96
|
-
ENV["BUNDLE_PATH"] = LogStash::Environment::BUNDLE_DIR
|
97
|
-
ENV["BUNDLE_WITHOUT"] = "development"
|
98
|
-
end
|
99
|
-
# force BUNDLE_GEMFILE since Bundler does not store it in its ./bundle/config. this is required otherwise Bundler will look for the Gemfile in the CWD
|
100
|
-
# and will crash when invoking logstash outside its home dir.
|
101
|
-
ENV["BUNDLE_GEMFILE"] = LogStash::Environment::GEMFILE_PATH
|
34
|
+
def runtime_jars_root(dir_name, package)
|
35
|
+
::File.join(dir_name, package, "runtime-jars")
|
36
|
+
end
|
102
37
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
require "bundler"
|
38
|
+
def test_jars_root(dir_name, package)
|
39
|
+
::File.join(dir_name, package, "test-jars")
|
40
|
+
end
|
107
41
|
|
108
|
-
|
42
|
+
def load_runtime_jars!(dir_name="vendor", package="jar-dependencies")
|
43
|
+
load_jars!(::File.join(runtime_jars_root(dir_name, package), "*.jar"))
|
44
|
+
end
|
109
45
|
|
110
|
-
|
111
|
-
::
|
112
|
-
::Bundler.setup
|
46
|
+
def load_test_jars!(dir_name="vendor", package="jar-dependencies")
|
47
|
+
load_jars!(::File.join(test_jars_root(dir_name, package), "*.jar"))
|
113
48
|
end
|
114
49
|
|
115
|
-
def
|
116
|
-
|
50
|
+
def load_jars!(pattern)
|
51
|
+
raise(LogStash::EnvironmentError, I18n.t("logstash.environment.jruby-required")) unless LogStash::Environment.jruby?
|
52
|
+
|
53
|
+
jar_files = find_jars(pattern)
|
54
|
+
require_jars! jar_files
|
117
55
|
end
|
118
56
|
|
119
|
-
|
120
|
-
|
121
|
-
|
57
|
+
def find_jars(pattern)
|
58
|
+
require 'java'
|
59
|
+
jar_files = Dir.glob(pattern)
|
60
|
+
raise(LogStash::EnvironmentError, I18n.t("logstash.environment.missing-jars", :pattern => pattern)) if jar_files.empty?
|
61
|
+
jar_files
|
122
62
|
end
|
123
63
|
|
124
|
-
|
125
|
-
|
126
|
-
|
64
|
+
def require_jars!(files)
|
65
|
+
files.each do |jar_file|
|
66
|
+
loaded = require jar_file
|
67
|
+
puts("Loaded #{jar_file}") if $DEBUG && loaded
|
68
|
+
end
|
127
69
|
end
|
128
70
|
|
129
|
-
|
130
|
-
|
131
|
-
RUBY_ENGINE
|
71
|
+
def ruby_bin
|
72
|
+
ENV["USE_RUBY"] == "1" ? "ruby" : File.join("vendor", "jruby", "bin", "jruby")
|
132
73
|
end
|
133
74
|
|
134
75
|
def jruby?
|
@@ -143,16 +84,12 @@ module LogStash
|
|
143
84
|
return ::File.join(LOGSTASH_HOME, "vendor", path)
|
144
85
|
end
|
145
86
|
|
146
|
-
def plugin_path(path)
|
147
|
-
return ::File.join(LOGSTASH_HOME, "lib", "logstash", path)
|
148
|
-
end
|
149
|
-
|
150
87
|
def pattern_path(path)
|
151
88
|
return ::File.join(LOGSTASH_HOME, "patterns", path)
|
152
89
|
end
|
153
90
|
|
154
91
|
def locales_path(path)
|
155
|
-
return ::File.join(
|
92
|
+
return ::File.join(LOGSTASH_CORE, "locales", path)
|
156
93
|
end
|
157
94
|
|
158
95
|
def load_locale!
|