mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
parent
e85f31962e
commit
f86f1377cc
6 changed files with 13 additions and 24 deletions
|
@ -1,20 +1,9 @@
|
||||||
# this is a generated file, to avoid over-writing it just delete this comment
|
# this is a generated file, to avoid over-writing it just delete this comment
|
||||||
begin
|
require 'jar_dependencies'
|
||||||
require 'jar_dependencies'
|
|
||||||
rescue LoadError
|
|
||||||
require 'com/fasterxml/jackson/core/jackson-databind/2.7.3/jackson-databind-2.7.3.jar'
|
|
||||||
require 'org/apache/logging/log4j/log4j-api/2.6.2/log4j-api-2.6.2.jar'
|
|
||||||
require 'com/fasterxml/jackson/core/jackson-annotations/2.7.0/jackson-annotations-2.7.0.jar'
|
|
||||||
require 'com/fasterxml/jackson/module/jackson-module-afterburner/2.7.3/jackson-module-afterburner-2.7.3.jar'
|
|
||||||
require 'com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.7.3/jackson-dataformat-cbor-2.7.3.jar'
|
|
||||||
require 'com/fasterxml/jackson/core/jackson-core/2.7.3/jackson-core-2.7.3.jar'
|
|
||||||
end
|
|
||||||
|
|
||||||
if defined? Jars
|
require_jar( 'com.fasterxml.jackson.core', 'jackson-annotations', '2.7.0' )
|
||||||
require_jar( 'com.fasterxml.jackson.core', 'jackson-databind', '2.7.3' )
|
require_jar( 'com.fasterxml.jackson.core', 'jackson-databind', '2.7.3' )
|
||||||
require_jar( 'org.apache.logging.log4j', 'log4j-api', '2.6.2' )
|
require_jar( 'org.apache.logging.log4j', 'log4j-api', '2.6.2' )
|
||||||
require_jar( 'com.fasterxml.jackson.core', 'jackson-annotations', '2.7.0' )
|
require_jar( 'com.fasterxml.jackson.module', 'jackson-module-afterburner', '2.7.3' )
|
||||||
require_jar( 'com.fasterxml.jackson.module', 'jackson-module-afterburner', '2.7.3' )
|
require_jar( 'com.fasterxml.jackson.dataformat', 'jackson-dataformat-cbor', '2.7.3' )
|
||||||
require_jar( 'com.fasterxml.jackson.dataformat', 'jackson-dataformat-cbor', '2.7.3' )
|
require_jar( 'com.fasterxml.jackson.core', 'jackson-core', '2.7.3' )
|
||||||
require_jar( 'com.fasterxml.jackson.core', 'jackson-core', '2.7.3' )
|
|
||||||
end
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ class LogStash::Agent
|
||||||
@reload_metric = metric.namespace([:stats, :pipelines])
|
@reload_metric = metric.namespace([:stats, :pipelines])
|
||||||
|
|
||||||
@dispatcher = LogStash::EventDispatcher.new(self)
|
@dispatcher = LogStash::EventDispatcher.new(self)
|
||||||
LogStash::PluginRegistry.hooks.register_emitter(self.class, dispatcher)
|
LogStash::PLUGIN_REGISTRY.hooks.register_emitter(self.class, dispatcher)
|
||||||
dispatcher.fire(:after_initialize)
|
dispatcher.fire(:after_initialize)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,6 @@ class LogStash::Plugin
|
||||||
# Should I remove this now and make sure the pipeline invoke the Registry or I should wait for 6.0
|
# Should I remove this now and make sure the pipeline invoke the Registry or I should wait for 6.0
|
||||||
# Its not really part of the public api but its used by the tests a lot to mock the plugins.
|
# Its not really part of the public api but its used by the tests a lot to mock the plugins.
|
||||||
def self.lookup(type, name)
|
def self.lookup(type, name)
|
||||||
LogStash::PluginRegistry.lookup_pipeline_plugin(type, name)
|
LogStash::PLUGIN_REGISTRY.lookup_pipeline_plugin(type, name)
|
||||||
end
|
end
|
||||||
end # class LogStash::Plugin
|
end # class LogStash::Plugin
|
||||||
|
|
|
@ -172,7 +172,7 @@ module LogStash module Plugins
|
||||||
end
|
end
|
||||||
|
|
||||||
def lookup_pipeline_plugin(type, name)
|
def lookup_pipeline_plugin(type, name)
|
||||||
LogStash::PluginRegistry.lookup(type, name) do |plugin_klass, plugin_name|
|
LogStash::PLUGIN_REGISTRY.lookup(type, name) do |plugin_klass, plugin_name|
|
||||||
is_a_plugin?(plugin_klass, plugin_name)
|
is_a_plugin?(plugin_klass, plugin_name)
|
||||||
end
|
end
|
||||||
rescue LoadError, NameError => e
|
rescue LoadError, NameError => e
|
||||||
|
@ -244,5 +244,5 @@ module LogStash module Plugins
|
||||||
end
|
end
|
||||||
end end
|
end end
|
||||||
|
|
||||||
PluginRegistry = Plugins::Registry.new
|
PLUGIN_REGISTRY = Plugins::Registry.new
|
||||||
end
|
end
|
||||||
|
|
|
@ -201,7 +201,7 @@ class LogStash::Runner < Clamp::StrictCommand
|
||||||
|
|
||||||
# We configure the registry and load any plugin that can register hooks
|
# We configure the registry and load any plugin that can register hooks
|
||||||
# with logstash, this need to be done before any operation.
|
# with logstash, this need to be done before any operation.
|
||||||
LogStash::PluginRegistry.setup!
|
LogStash::PLUGIN_REGISTRY.setup!
|
||||||
@settings.validate_all
|
@settings.validate_all
|
||||||
|
|
||||||
LogStash::Util::set_thread_name(self.class.name)
|
LogStash::Util::set_thread_name(self.class.name)
|
||||||
|
|
|
@ -35,7 +35,7 @@ describe "conditionals in output" do
|
||||||
end
|
end
|
||||||
|
|
||||||
before do
|
before do
|
||||||
LogStash::PluginRegistry.add(:output, "dummynull", DummyNullOutput)
|
LogStash::PLUGIN_REGISTRY.add(:output, "dummynull", DummyNullOutput)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "simple" do
|
describe "simple" do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue