Kouhei Sutou
null+****@clear*****
Mon Oct 3 16:44:47 JST 2016
Kouhei Sutou 2016-10-03 16:44:47 +0900 (Mon, 03 Oct 2016) New Revision: 530f421080cd4ad131eacc1cfd6ade474fabc19d https://github.com/groonga/fluent-plugin-groonga/commit/530f421080cd4ad131eacc1cfd6ade474fabc19d Message: Add more information to logs Modified files: lib/fluent/plugin/in_groonga.rb Modified: lib/fluent/plugin/in_groonga.rb (+7 -6) =================================================================== --- lib/fluent/plugin/in_groonga.rb 2016-10-03 16:34:49 +0900 (cb79e0d) +++ lib/fluent/plugin/in_groonga.rb 2016-10-03 16:44:47 +0900 (9848857) @@ -182,7 +182,8 @@ module Fluent def run @loop.run rescue - $log.error "unexpected error", :error => $!.to_s + $log.error("[input][groonga][error] unexpected error", + :error => "#{$!.class}: #{$!}") $log.error_backtrace end @@ -213,7 +214,7 @@ module Fluent def on_connect @repeater =****@input*****_repeater(self) @repeater.on_connect_failed do - $log.error("[input][groonga][error] " + + $log.error("[input][groonga][connect][error] " + "failed to connect to Groonga:", :real_host => @input.real_host, :real_port => @input.real_port) @@ -227,13 +228,13 @@ module Fluent begin @request_handler << data rescue HTTP::Parser::Error, URI::InvalidURIError - $log.error("[input][groonga][error] " + + $log.error("[input][groonga][request][error] " + "failed to parse HTTP request:", :error => "#{$!.class}: #{$!}") $log.error_backtrace reply_error_response("400 Bad Request") rescue - $log.error("[input][groonga][error] " + + $log.error("[input][groonga][request][error] " + "failed to handle HTTP request:", :error => "#{$!.class}: #{$!}") $log.error_backtrace @@ -245,8 +246,8 @@ module Fluent begin @response_handler << data rescue - $log.error("[input][groonga][error] " + - "failed to handle HTTP response:", + $log.error("[input][groonga][response][error] " + + "failed to handle HTTP response from Groonga:", :error => "#{$!.class}: #{$!}") $log.error_backtrace reply_error_response("500 Internal Server Error") -------------- next part -------------- HTML����������������������������... Download