Merge branch 'master' into issue/17

This commit is contained in:
Jordan Sissel 2011-02-19 17:54:51 -08:00
commit 96eb87d56f
5 changed files with 19 additions and 7 deletions

2
.gitignore vendored
View file

@ -1,4 +1,4 @@
.*.swp
*.gem
local
test/setup/elasticsearch/elasticsearch-*

View file

@ -1,4 +1,4 @@
Copyright 2009-2010 Jordan Sissel, Pete Fritchman, and contributors.
Copyright 2009-2011 Jordan Sissel, Pete Fritchman, and contributors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

View file

@ -38,7 +38,6 @@ class LogStash::Inputs::Amqp < LogStash::Inputs::Base
:vhost => (@vhost or "/"),
:host => @url.host,
:port => (@url.port or 5672),
:logging => true
}
amqpsettings[:user] = @url.user if @url.user
amqpsettings[:pass] = @url.password if @url.password

View file

@ -36,7 +36,6 @@ class LogStash::Outputs::Amqp < LogStash::Outputs::Base
:vhost => (@vhost or "/"),
:host => @url.host,
:port => (@url.port or 5672),
:logging => true
}
amqpsettings[:user] = @url.user if @url.user
amqpsettings[:pass] = @url.password if @url.password

View file

@ -6,12 +6,26 @@ class LogStash::Outputs::Stdout < LogStash::Outputs::Base
config :debug => :boolean
public
def register
# nothing to do
def initialize(*args)
super
@opts = {}
if @url.path != "/"
@opts = @url.path[1..-1].split(",")
end
end # def register
public
def receive(event)
puts event
if debug?
ap event
else
puts event
end
end # def event
public
def debug?
return @opts.member?("debug")
end
end # class LogStash::Outputs::Stdout