Skip to content

Commit

Permalink
Merge pull request #30 from lusis/gelf-sender-override
Browse files Browse the repository at this point in the history
Gelf sender override
  • Loading branch information
jordansissel committed Jun 30, 2011
2 parents adc39d1 + d38842a commit 60c3d0f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/logstash/outputs/gelf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class LogStash::Outputs::Gelf < LogStash::Outputs::Base
# The GELF chunksize
config :chunksize, :validate => :number, :default => 1420

config :sender, :validate => :string, :default => "%{@source_host}"

# The GELF message level. Dynamic values like %{level} are permitted here;
# useful if you want to parse the 'log level' from an event and use that
# as the gelf level/severity.
Expand Down Expand Up @@ -70,7 +72,8 @@ def receive(event)
end

m["full_message"] = (event.message)
m["host"] = event["@source_host"]

m["host"] = event.sprintf(@sender)
m["file"] = event["@source_path"]

event.fields.each do |name, value|
Expand Down

0 comments on commit 60c3d0f

Please sign in to comment.