Skip to content

Commit

Permalink
Merge pull request #2239 from okkez/string-squeeze
Browse files Browse the repository at this point in the history
Use String#squeeze instead of String#gsub
  • Loading branch information
repeatedly authored Dec 20, 2018
2 parents 7de42d6 + 9b72afb commit 7f2bea8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/fluent/plugin/parser_syslog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def parse_plain(text, &block)
when "pri"
record['pri'] = value.to_i
when "time"
time = @mutex.synchronize { @time_parser.parse(value.gsub(/ +/, ' ')) }
time = @mutex.synchronize { @time_parser.parse(value.squeeze(' ')) }
record[name] = value if @keep_time_key
else
record[name] = value
Expand Down

0 comments on commit 7f2bea8

Please sign in to comment.