Module: LogStash::Outputs

Defined in:
lib/logstash/namespace.rb,
lib/logstash/outputs.rb

Defined Under Namespace

Classes: Amqp, Base, Beanstalk, Elasticsearch, Gelf, Internal, Mongodb, Nagios, Redis, Stdout, Stomp, Tcp, Websocket

Class Method Summary collapse

Class Method Details

.from_url(url, &block) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/logstash/outputs.rb', line 6

def self.from_url(url, &block)
  uri = URI.parse(url)
  # TODO(sissel): Add error handling
  # TODO(sissel): Allow plugin paths
  klass = uri.scheme.capitalize
  file = uri.scheme
  require "logstash/outputs/#{file}"
  LogStash::Outputs.const_get(klass).new(uri, &block)
end