Skip to content

Commit 761b35e

Browse files
committed
Change field to source to meet standards
1 parent 2b35224 commit 761b35e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/logstash/filters/tld.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class LogStash::Filters::Tld < LogStash::Filters::Base
2020
config_name "tld"
2121
milestone 1
2222

23-
# The field to parse
24-
config :field, :validate => :string, :default => "message"
23+
# The source field to parse
24+
config :source, :validate => :string, :default => "message"
2525

2626
# The target field to place all the data
2727
config :target, :validate => :string, :default => "tld"
@@ -35,8 +35,8 @@ def register
3535
public
3636
def filter(event)
3737

38-
if @field and PublicSuffix.valid?(event[@field])
39-
domain = PublicSuffix.parse(event[@field])
38+
if @field and PublicSuffix.valid?(event[@source])
39+
domain = PublicSuffix.parse(event[@source])
4040
# Replace the event message with our message as configured in the
4141
# config file.
4242
event[@target] = Hash.new

0 commit comments

Comments
 (0)