logstash-core 1.5.0.beta2-java → 1.5.0-java

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of logstash-core might be problematic. Click here for more details.

Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/lib/logstash-core.rb +2 -0
  3. data/lib/logstash/agent.rb +0 -41
  4. data/lib/logstash/config/config_ast.rb +62 -29
  5. data/lib/logstash/config/mixin.rb +3 -3
  6. data/lib/logstash/environment.rb +37 -100
  7. data/lib/logstash/event.rb +32 -20
  8. data/lib/logstash/filters/base.rb +20 -0
  9. data/lib/logstash/java_integration.rb +72 -18
  10. data/lib/logstash/namespace.rb +0 -3
  11. data/lib/logstash/outputs/base.rb +1 -1
  12. data/lib/logstash/patches/bundler.rb +20 -0
  13. data/lib/logstash/patches/rubygems.rb +37 -0
  14. data/lib/logstash/pipeline.rb +59 -39
  15. data/lib/logstash/runner.rb +4 -50
  16. data/lib/logstash/util.rb +0 -1
  17. data/lib/logstash/util/accessors.rb +6 -0
  18. data/lib/logstash/version.rb +1 -1
  19. data/locales/en.yml +5 -0
  20. data/logstash-core.gemspec +51 -0
  21. data/spec/core/conditionals_spec.rb +428 -0
  22. data/spec/core/config_mixin_spec.rb +99 -0
  23. data/spec/core/config_spec.rb +108 -0
  24. data/spec/core/environment_spec.rb +44 -0
  25. data/spec/core/event_spec.rb +473 -0
  26. data/spec/core/pipeline_spec.rb +198 -0
  27. data/spec/core/plugin_spec.rb +106 -0
  28. data/spec/core/runner_spec.rb +39 -0
  29. data/spec/core/timestamp_spec.rb +83 -0
  30. data/spec/filters/base_spec.rb +318 -0
  31. data/spec/inputs/base_spec.rb +13 -0
  32. data/spec/lib/logstash/bundler_spec.rb +120 -0
  33. data/spec/lib/logstash/java_integration_spec.rb +257 -0
  34. data/spec/logstash/agent_spec.rb +37 -0
  35. data/spec/outputs/base_spec.rb +47 -0
  36. data/spec/spec_helper.rb +1 -0
  37. data/spec/util/accessors_spec.rb +215 -0
  38. data/spec/util/charset_spec.rb +74 -0
  39. data/spec/util/fieldeval_spec.rb +96 -0
  40. data/spec/util/gemfile_spec.rb +212 -0
  41. data/spec/util/json_spec.rb +97 -0
  42. data/spec/util/plugin_version_spec.rb +48 -0
  43. data/spec/util/retryable_spec.rb +145 -0
  44. data/spec/util_spec.rb +34 -0
  45. metadata +96 -253
  46. data/lib/logstash-event.rb +0 -2
  47. data/lib/logstash.rb +0 -4
  48. data/lib/logstash/JRUBY-PR1448.rb +0 -32
  49. data/lib/logstash/bundler.rb +0 -124
  50. data/lib/logstash/gemfile.rb +0 -175
  51. data/lib/logstash/pluginmanager.rb +0 -17
  52. data/lib/logstash/pluginmanager/install.rb +0 -112
  53. data/lib/logstash/pluginmanager/list.rb +0 -38
  54. data/lib/logstash/pluginmanager/main.rb +0 -22
  55. data/lib/logstash/pluginmanager/maven_tools_patch.rb +0 -12
  56. data/lib/logstash/pluginmanager/uninstall.rb +0 -49
  57. data/lib/logstash/pluginmanager/update.rb +0 -50
  58. data/lib/logstash/pluginmanager/util.rb +0 -88
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1c512265bcb6873ce0def467329ba6b4a058aea5
4
- data.tar.gz: a376414ac39751f9c4e7b67fbb109410fe4d04b8
3
+ metadata.gz: 69a97d7d7b23b0e8c46eec7149ab4370f943d222
4
+ data.tar.gz: bab042c02f71ac9a9e7319cce8321e631553ab20
5
5
  SHA512:
6
- metadata.gz: 5520cb37d6482b810ab0501e370bb08e859365d7b5e4217683fc065ecde3c859dde0f3da0c8447ff5b28ab19f9264db9cc4c8e5e5523a6a53bb8c57f3054608a
7
- data.tar.gz: b722a0fe0d550a82adafc116bd579489f7871c633d22dce7d9724ca6617c107e09b138a92632babf75eebb704a9f2fb34022e05ed544d0b0381cfc05b4befd64
6
+ metadata.gz: 18d78f1d0762674a720dc763c8843b74ca2c0af16c4321b9496e1636511ec2f79271e934c9f068e6bc92c0897d93d8306d9ce305d1fa63b8cd3386ce1fc0ee55
7
+ data.tar.gz: ff72f2f8ad1af596dbe4cf6c89b40b0ae52966d90e950e046dd1fdee4e1bdbc6b3fed1fe441252d524d631daaada7cf71e21d23093a6ca7b7f06c48d5f5d812e
@@ -0,0 +1,2 @@
1
+ module LogStash
2
+ end
@@ -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 << "@#{type}_func = lambda do |event, &block|"
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
- flushed_events = #{name}.flush(options)
152
+ events = #{name}.flush(options)
129
153
 
130
- return if flushed_events.nil? || flushed_events.empty?
154
+ return if events.nil? || events.empty?
131
155
 
132
- flushed_events.each do |event|
133
- @logger.debug? && @logger.debug(\"Flushing\", :plugin => #{name}, :event => event)
156
+ @logger.debug? && @logger.debug(\"Flushing\", :plugin => #{name}, :events => events)
134
157
 
135
- events = [event]
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.flat_map do |event|
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.inspect + ".force_encoding(Encoding::UTF_8)" + ")"
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
- return <<-CODE
368
- events = events.flat_map do |event|
369
- events = [event]
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
- events
373
- end
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.error(I18n.t('logstash.plugin.deprecated_milestone', :plugin => config_name))
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.elasticsearch.org/guide/en/logstash/current/_logstash_config_language.html#bytes"
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}"
@@ -1,78 +1,19 @@
1
1
  require "logstash/errors"
2
- require 'logstash/version'
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
- LOGSTASH_HOME = ::File.expand_path(::File.join(::File.dirname(__FILE__), "..", ".."))
47
- JAR_DIR = ::File.join(LOGSTASH_HOME, "vendor", "jar")
48
- ELASTICSEARCH_DIR = ::File.join(LOGSTASH_HOME, "vendor", "elasticsearch")
49
- BUNDLE_DIR = ::File.join(LOGSTASH_HOME, "vendor", "bundle")
50
- GEMFILE_PATH = ::File.join(LOGSTASH_HOME, "Gemfile")
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
- def logstash_gem_home
74
- ::File.join(BUNDLE_DIR, ruby_engine, gem_ruby_version)
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 bundler_setup!
94
- # if there's no .bundle/config setup the runtime environment.
95
- unless ::File.exists?(BUNDLE_CONFIG_PATH)
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
- # make sure we use our own nicely installed bundler and not a rogue, bad, mean, ugly, stupid other bundler. bad bundler, bad bad bundler go away.
104
- Gem.clear_paths
105
- Gem.paths = ENV['GEM_HOME'] = ENV['GEM_PATH'] = logstash_gem_home
106
- require "bundler"
38
+ def test_jars_root(dir_name, package)
39
+ ::File.join(dir_name, package, "test-jars")
40
+ end
107
41
 
108
- require "logstash/bundler"
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
- ::Bundler.reset_settings # our monkey patched method
111
- ::Bundler.reset!
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 ruby_bin
116
- ENV["USE_RUBY"] == "1" ? "ruby" : File.join("vendor", "jruby", "bin", "jruby")
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
- # @return [String] major.minor ruby version, ex 1.9
120
- def ruby_abi_version
121
- RUBY_VERSION[/(\d+\.\d+)(\.\d+)*/, 1]
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
- # @return [String] the ruby version string bundler uses to craft its gem path
125
- def gem_ruby_version
126
- RbConfig::CONFIG["ruby_version"]
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
- # @return [String] jruby, ruby, rbx, ...
130
- def ruby_engine
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(LOGSTASH_HOME, "locales", path)
92
+ return ::File.join(LOGSTASH_CORE, "locales", path)
156
93
  end
157
94
 
158
95
  def load_locale!