Method: LogStash::Outputs.from_url
- Defined in:
- lib/logstash/outputs.rb
.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 |