Skip to content

Commit

Permalink
remove superfluous decscription, run-ons etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtado committed Jan 20, 2014
1 parent af51361 commit 99218bc
Showing 1 changed file with 12 additions and 31 deletions.
43 changes: 12 additions & 31 deletions lib/logstash/filters/date.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
require "logstash/filters/base"
require "logstash/namespace"

# The date filter is used for parsing dates from fields and using that
# date or timestamp as the timestamp for the event.
# The date filter is used for parsing dates from fields, and then using that
# date or timestamp as the logstash timestamp for the event.
#
# For example, syslog events usually have timestamps like this:
#
Expand All @@ -28,25 +28,25 @@ class LogStash::Filters::Date < LogStash::Filters::Base
config_name "date"
milestone 3

# Specify a timezone canonical ID to be used for date parsing.
# The valid ID are listed on http://joda-time.sourceforge.net/timezones.html
# Useful in case the timezone cannot be extracted from the value,
# Specify a time zone canonical ID to be used for date parsing.
# The valid IDs are listed on the (Joda.org available time zones page)[http://joda-time.sourceforge.net/timezones.html].
# This is useful in case the time zone cannot be extracted from the value,
# and is not the platform default.
# If this is not specified the platform default will be used.
# Canonical ID is good as it takes care of daylight saving time for you
# For example, America/Los_Angeles or Europe/France are valid IDs.
# For example, `America/Los_Angeles` or `Europe/France` are valid IDs.
config :timezone, :validate => :string

# specify a locale to be used for date parsing. If this is not specified the
# platform default will be used
# Specify a locale to be used for date parsing. If this is not specified, the
# platform default will be used.
#
# The locale is mostly necessary to be set for parsing month names and
# weekday names
# weekday names.
#
config :locale, :validate => :string

# The date formats allowed are anything allowed by Joda-Time (java time
# library): You can see the docs for this format here:
# library). You can see the docs for this format here:
#
# [joda.time.format.DateTimeFormat](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/DateTimeFormat.html)
#
Expand All @@ -60,7 +60,7 @@ class LogStash::Filters::Date < LogStash::Filters::Base
#
# The above will match a syslog (rfc3164) or iso8601 timestamp.
#
# There are a few special exceptions, the following format literals exist
# There are a few special exceptions. The following format literals exist
# to help you save time and ensure correctness of date parsing.
#
# * "ISO8601" - should parse any valid ISO8601 timestamp, such as
Expand All @@ -69,7 +69,7 @@ class LogStash::Filters::Date < LogStash::Filters::Base
# * "UNIX_MS" - will parse unix time in milliseconds since epoch
# * "TAI64N" - will parse tai64n time values
#
# For example, if you have a field 'logdate' and with a value that looks like
# For example, if you have a field 'logdate', with a value that looks like
# 'Aug 13 2010 00:03:44', you would use this configuration:
#
# filter {
Expand All @@ -90,25 +90,6 @@ class LogStash::Filters::Date < LogStash::Filters::Base
# LOGSTASH-34
DATEPATTERNS = %w{ y d H m s S }

# The 'date' filter will take a value from your event and use it as the
# event timestamp. This is useful for parsing logs generated on remote
# servers or for importing old logs.
#
# The config looks like this:
#
# filter {
# date {
# type => "typename"
# filename => fieldformat
# # Example:
# timestamp => "mmm DD HH:mm:ss"
# }
# }
#
# The format is whatever is supported by Joda; generally:
# http://download.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html
#
# TODO(sissel): Support 'seconds since epoch' parsing (nagios uses this)
public
def initialize(config = {})
super
Expand Down

0 comments on commit 99218bc

Please sign in to comment.