[Groonga-commit] droonga/fluent-plugin-droonga at 771b75a [master] Log not replied error

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Mar 21 18:36:50 JST 2014


Kouhei Sutou	2014-03-21 18:36:50 +0900 (Fri, 21 Mar 2014)

  New Revision: 771b75a40ffd8d792175912716545c74ae8ad365
  https://github.com/droonga/fluent-plugin-droonga/commit/771b75a40ffd8d792175912716545c74ae8ad365

  Message:
    Log not replied error

  Modified files:
    lib/droonga/dispatcher.rb

  Modified: lib/droonga/dispatcher.rb (+13 -2)
===================================================================
--- lib/droonga/dispatcher.rb    2014-03-21 16:49:34 +0900 (dd54328)
+++ lib/droonga/dispatcher.rb    2014-03-21 18:36:50 +0900 (25d452d)
@@ -134,8 +134,19 @@ module Droonga
       if adapter_runner
         adapted_message = adapter_runner.adapt_output(adapted_message)
       end
-      return if adapted_message["replyTo"].nil?
-      @replier.reply(adapted_message)
+      if adapted_message["replyTo"].nil?
+        status_code = adapted_message["statusCode"]
+        if status_code != 200
+          dataset = adapted_message["dataset"]
+          body = adapted_message["body"] || {}
+          name = body["name"] || "Unknown"
+          message = body["message"] || "unknown error"
+          logger.error("orphan error: " +
+                         "<#{dataset}>[#{name}](#{status_code}): #{message}")
+        end
+      else
+        @replier.reply(adapted_message)
+      end
     end
 
     def process_internal_message(message)
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index