[Groonga-commit] droonga/fluent-plugin-droonga at b3cf914 [master] processor: extract log tag

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Dec 20 17:18:35 JST 2013


Kouhei Sutou	2013-12-20 17:18:35 +0900 (Fri, 20 Dec 2013)

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

  Message:
    processor: extract log tag

  Modified files:
    lib/droonga/processor.rb

  Modified: lib/droonga/processor.rb (+11 -6)
===================================================================
--- lib/droonga/processor.rb    2013-12-20 17:13:45 +0900 (cca47b1)
+++ lib/droonga/processor.rb    2013-12-20 17:18:35 +0900 (cb4d8ac)
@@ -32,16 +32,16 @@ module Droonga
     end
 
     def shutdown
-      $log.trace("processor: shutdown: start")
+      $log.trace("#{log_tag}: shutdown: start")
       @handler.shutdown
-      $log.trace("processor: shutdown: done")
+      $log.trace("#{log_tag}: shutdown: done")
     end
 
     def process(envelope, synchronous=nil)
-      $log.trace("proessor: process: start")
+      $log.trace("#{log_tag}: process: start")
       command = envelope["type"]
       if****@handl*****?(command)
-        $log.trace("proessor: process: handlable: #{command}")
+        $log.trace("#{log_tag}: process: handlable: #{command}")
         if synchronous.nil?
           synchronous =****@handl*****_synchronous?(command)
         end
@@ -51,9 +51,14 @@ module Droonga
           @message_pusher.push(envelope)
         end
       else
-        $log.trace("proessor: process: ignore #{command}")
+        $log.trace("#{log_tag}: process: ignore #{command}")
       end
-      $log.trace("proessor: process: done")
+      $log.trace("#{log_tag}: process: done")
+    end
+
+    private
+    def log_tag
+      "processor"
     end
   end
 end
-------------- next part --------------
HTML����������������������������...
Download 



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