From 357092d7fb4bd9d2a7f73fa1b0d9c6ef88fefcd2 Mon Sep 17 00:00:00 2001 From: Hearen Date: Thu, 4 Apr 2019 16:11:29 +0800 Subject: [PATCH] just tiny typo (grammar) Signed-off-by: Hearen --- lib/fluent/compat/socket_util.rb | 2 +- lib/fluent/plugin/filter_parser.rb | 2 +- lib/fluent/plugin/in_tail.rb | 2 +- lib/fluent/plugin/in_tcp.rb | 2 +- lib/fluent/plugin/in_udp.rb | 2 +- test/plugin/test_filter_parser.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/fluent/compat/socket_util.rb b/lib/fluent/compat/socket_util.rb index 38ba7cdc6e..969696c4c1 100644 --- a/lib/fluent/compat/socket_util.rb +++ b/lib/fluent/compat/socket_util.rb @@ -148,7 +148,7 @@ def run def on_message(msg, addr) @parser.parse(msg) { |time, record| unless time && record - log.warn "pattern not match: #{msg.inspect}" + log.warn "pattern not matched: #{msg.inspect}" return end diff --git a/lib/fluent/plugin/filter_parser.rb b/lib/fluent/plugin/filter_parser.rb index 97c5f6a481..e9c03fd944 100644 --- a/lib/fluent/plugin/filter_parser.rb +++ b/lib/fluent/plugin/filter_parser.rb @@ -82,7 +82,7 @@ def filter_with_time(tag, time, record) return t, r else if @emit_invalid_record_to_error - router.emit_error_event(tag, time, record, Fluent::Plugin::Parser::ParserError.new("pattern not match with data '#{raw_value}'")) + router.emit_error_event(tag, time, record, Fluent::Plugin::Parser::ParserError.new("pattern not matched with data '#{raw_value}'")) end if @reserve_data t = time diff --git a/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb index d054d109f9..b2fa734a1f 100644 --- a/lib/fluent/plugin/in_tail.rb +++ b/lib/fluent/plugin/in_tail.rb @@ -427,7 +427,7 @@ def convert_line_to_event(line, es, tail_watcher) record[@path_key] ||= tail_watcher.path unless @path_key.nil? es.add(Fluent::EventTime.now, record) end - log.warn "pattern not match: #{line.inspect}" + log.warn "pattern not matched: #{line.inspect}" end } rescue => e diff --git a/lib/fluent/plugin/in_tcp.rb b/lib/fluent/plugin/in_tcp.rb index c86d561ba9..9f7a2a10e7 100644 --- a/lib/fluent/plugin/in_tcp.rb +++ b/lib/fluent/plugin/in_tcp.rb @@ -71,7 +71,7 @@ def start @parser.parse(msg) do |time, record| unless time && record - log.warn "pattern not match", message: msg + log.warn "pattern not matched", message: msg next end diff --git a/lib/fluent/plugin/in_udp.rb b/lib/fluent/plugin/in_udp.rb index c150ccfea5..c2d436115f 100644 --- a/lib/fluent/plugin/in_udp.rb +++ b/lib/fluent/plugin/in_udp.rb @@ -74,7 +74,7 @@ def start begin @parser.parse(data) do |time, record| unless time && record - log.warn "pattern not match", data: data + log.warn "pattern not matched", data: data next end diff --git a/test/plugin/test_filter_parser.rb b/test/plugin/test_filter_parser.rb index d4f52606ed..878fef7d6c 100644 --- a/test/plugin/test_filter_parser.rb +++ b/test/plugin/test_filter_parser.rb @@ -680,7 +680,7 @@ class UnmatchedPatternLogTest < self def test_call_emit_error_event_when_pattern_is_mismached flexmock(@d.instance.router).should_receive(:emit_error_event). - with(String, Integer, Hash, ParserError.new("pattern not match with data '#{INVALID_MESSAGE}'")).once + with(String, Integer, Hash, ParserError.new("pattern not matched with data '#{INVALID_MESSAGE}'")).once @d.run do @d.feed(@tag, Fluent::EventTime.now.to_i, {'message' => INVALID_MESSAGE}) end