[Groonga-commit] groonga/fluent-plugin-groonga [master] out: pass tag

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Sun Nov 25 22:52:53 JST 2012


Kouhei Sutou	2012-11-25 22:52:53 +0900 (Sun, 25 Nov 2012)

  New Revision: 96654dfc8e3f4480f886c855f63eb90ecb05bdd5
  https://github.com/groonga/fluent-plugin-groonga/commit/96654dfc8e3f4480f886c855f63eb90ecb05bdd5

  Log:
    out: pass tag

  Modified files:
    lib/fluent/plugin/out_groonga.rb

  Modified: lib/fluent/plugin/out_groonga.rb (+6 -6)
===================================================================
--- lib/fluent/plugin/out_groonga.rb    2012-11-09 00:20:10 +0900 (8ba8d24)
+++ lib/fluent/plugin/out_groonga.rb    2012-11-25 22:52:53 +0900 (b3d1a95)
@@ -53,17 +53,17 @@ module Fluent
     end
 
     def format(tag, time, record)
-      [time, record].to_msgpack
+      [tag, time, record].to_msgpack
     end
 
     def write(chunk)
-      if /\Agroonga\.command\./ =~ chunk.key
-        command = $POSTMATCH
-        chunk.msgpack_each do |time, parameters|
+      chunk.msgpack_each do |tag, time, parameters|
+        if /\Agroonga\.command\./ =~ tag
+          command = $POSTMATCH
           @client.send(command, parameters)
+        else
+          store_chunk(chunk)
         end
-      else
-        store_chunk(chunk)
       end
     end
 
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る