[Groonga-commit] droonga/droonga-engine at 8a6e650 [master] Reduce annoying trace logs around watchers

アーカイブの一覧に戻る

YUKI Hiroshi null+****@clear*****
Wed Apr 15 21:11:45 JST 2015


YUKI Hiroshi	2015-04-15 21:11:45 +0900 (Wed, 15 Apr 2015)

  New Revision: 8a6e650dde0515c2d0e043f1118fe4ea5f49bbf4
  https://github.com/droonga/droonga-engine/commit/8a6e650dde0515c2d0e043f1118fe4ea5f49bbf4

  Message:
    Reduce annoying trace logs around watchers

  Modified files:
    lib/droonga/command/droonga_engine.rb
    lib/droonga/file_observer.rb
    lib/droonga/fluent_message_receiver.rb
    lib/droonga/job_pusher.rb
    lib/droonga/job_receiver.rb
    lib/droonga/process_supervisor.rb
    lib/droonga/serf/agent.rb
    lib/droonga/worker_process_agent.rb

  Modified: lib/droonga/command/droonga_engine.rb (+2 -2)
===================================================================
--- lib/droonga/command/droonga_engine.rb    2015-04-15 20:37:52 +0900 (e9fa988)
+++ lib/droonga/command/droonga_engine.rb    2015-04-15 21:11:45 +0900 (034d9a8)
@@ -739,7 +739,7 @@ module Droonga
             on_signal.call
           end
           @loop.attach(@async_watcher)
-          logger.trace("start: new watcher attached", :watcher => @async_watcher)
+          # logger.trace("start: new watcher attached", :watcher => @async_watcher)
           logger.trace("start: done")
         end
 
@@ -747,7 +747,7 @@ module Droonga
           return if @async_watcher.nil?
           logger.trace("stop: stert")
           @async_watcher.detach
-          logger.trace("stop: watcher detached", :watcher => @async_watcher)
+          # logger.trace("stop: watcher detached", :watcher => @async_watcher)
           @async_watcher = nil
           logger.trace("stop: done")
         end

  Modified: lib/droonga/file_observer.rb (+6 -6)
===================================================================
--- lib/droonga/file_observer.rb    2015-04-15 20:37:52 +0900 (13d0ab0)
+++ lib/droonga/file_observer.rb    2015-04-15 21:11:45 +0900 (9c2d51e)
@@ -50,16 +50,16 @@ module Droonga
         on_timer.call
       end
       @loop.attach(@watcher)
-      logger.trace("start: new file watcher attached",
-                   :watcher => @watcher,
-                   :path => @path)
+      # logger.trace("start: new file watcher attached",
+      #              :watcher => @watcher,
+      #              :path => @path)
     end
 
     def stop
       @watcher.detach
-      logger.trace("stop: file watcher detached",
-                   :watcher => @watcher,
-                   :path => @path)
+      # logger.trace("stop: file watcher detached",
+      #              :watcher => @watcher,
+      #              :path => @path)
     end
 
     private

  Modified: lib/droonga/fluent_message_receiver.rb (+12 -12)
===================================================================
--- lib/droonga/fluent_message_receiver.rb    2015-04-15 20:37:52 +0900 (579d41c)
+++ lib/droonga/fluent_message_receiver.rb    2015-04-15 21:11:45 +0900 (9d87318)
@@ -91,10 +91,10 @@ module Droonga
         @clients << client
       end
       @loop.attach(@server)
-      logger.trace("start_server: new server watcher attached",
-                   :watcher => @server,
-                   :listen_fd => @listen_fd,
-                   :heartbeat_fd => @heartbeat_fd)
+      # logger.trace("start_server: new server watcher attached",
+      #              :watcher => @server,
+      #              :listen_fd => @listen_fd,
+      #              :heartbeat_fd => @heartbeat_fd)
 
       logger.trace("start_server: done")
     end
@@ -106,8 +106,8 @@ module Droonga
     def shutdown_server
       logger.trace("shutdown_server: start")
       @server.close
-      logger.trace("shutdown_server: server watcher detached",
-                   :watcher => @server)
+      # logger.trace("shutdown_server: server watcher detached",
+      #              :watcher => @server)
       logger.trace("shutdown_server: done")
     end
 
@@ -134,17 +134,17 @@ module Droonga
           on_readable.call
         end
         @loop.attach(@watcher)
-        logger.trace("start: new heartbeat watcher attached",
-                     :watcher => @watcher,
-                     :fd => @fd)
+        # logger.trace("start: new heartbeat watcher attached",
+        #              :watcher => @watcher,
+        #              :fd => @fd)
       end
 
       def shutdown
         @socket.close
         @watcher.detach
-        logger.trace("shutdown: heartbeat watcher detached",
-                     :watcher => @watcher,
-                     :fd => @fd)
+        # logger.trace("shutdown: heartbeat watcher detached",
+        #              :watcher => @watcher,
+        #              :fd => @fd)
       end
 
       private

  Modified: lib/droonga/job_pusher.rb (+5 -5)
===================================================================
--- lib/droonga/job_pusher.rb    2015-04-15 20:37:52 +0900 (bae8b68)
+++ lib/droonga/job_pusher.rb    2015-04-15 21:11:45 +0900 (61a99ad)
@@ -37,16 +37,16 @@ module Droonga
       end
       FileUtils.chmod(0600, @socket_path)
       @loop.attach(@server)
-      logger.trace("connect: new server watcher attached",
-                   :watcher => @socket,
-                   :socket_path => @socket_path)
+      # logger.trace("connect: new server watcher attached",
+      #              :watcher => @socket,
+      #              :socket_path => @socket_path)
     end
 
     def close
       return unless @server
       @server.close
-      logger.trace("close: server watcher detached",
-                   :watcher => @socket)
+      # logger.trace("close: server watcher detached",
+      #              :watcher => @socket)
     end
 
     def shutdown

  Modified: lib/droonga/job_receiver.rb (+5 -5)
===================================================================
--- lib/droonga/job_receiver.rb    2015-04-15 20:37:52 +0900 (1ba2581)
+++ lib/droonga/job_receiver.rb    2015-04-15 21:11:45 +0900 (e9420ea)
@@ -33,17 +33,17 @@ module Droonga
       @receiver = Coolio::UNIXSocket.connect(@socket_path)
       setup_receive_handler(@receiver)
       @loop.attach(@receiver)
-      logger.trace("start: new receiver watcher attached",
-                   :watcher => @receiver,
-                   :socket_path => @socket_path)
+      # logger.trace("start: new receiver watcher attached",
+      #              :watcher => @receiver,
+      #              :socket_path => @socket_path)
       logger.trace("start: done")
     end
 
     def shutdown
       logger.trace("shutdown: start")
       @receiver.close
-      logger.trace("shutdown: receiver watcher attached",
-                   :watcher => @receiver)
+      # logger.trace("shutdown: receiver watcher attached",
+      #              :watcher => @receiver)
       logger.trace("shutdown: done")
     end
 

  Modified: lib/droonga/process_supervisor.rb (+8 -8)
===================================================================
--- lib/droonga/process_supervisor.rb    2015-04-15 20:37:52 +0900 (13e7b49)
+++ lib/droonga/process_supervisor.rb    2015-04-15 21:11:45 +0900 (6015069)
@@ -36,20 +36,20 @@ module Droonga
 
     def start
       @loop.attach(@input)
-      logger.trace("start: new input watcher attached",
-                   :watcher => @input)
+      # logger.trace("start: new input watcher attached",
+      #              :watcher => @input)
       @loop.attach(@output)
-      logger.trace("start: new output watcher attached",
-                   :watcher => @output)
+      # logger.trace("start: new output watcher attached",
+      #              :watcher => @output)
     end
 
     def stop
       @input.close
-      logger.trace("start: input watcher detached",
-                   :watcher => @input)
+      # logger.trace("start: input watcher detached",
+      #              :watcher => @input)
       @output.close
-      logger.trace("start: output watcher detached",
-                   :watcher => @output)
+      # logger.trace("start: output watcher detached",
+      #              :watcher => @output)
     end
 
     def stop_gracefully

  Modified: lib/droonga/serf/agent.rb (+8 -8)
===================================================================
--- lib/droonga/serf/agent.rb    2015-04-15 20:37:52 +0900 (f4915f3)
+++ lib/droonga/serf/agent.rb    2015-04-15 21:11:45 +0900 (d9e0032)
@@ -62,11 +62,11 @@ module Droonga
         return if****@pid*****?
         Process.waitpid(@pid)
         @output_io.close
-        logger.trace("stop: output_io watcher detached",
-                     :watcher => @output_io)
+        # logger.trace("stop: output_io watcher detached",
+        #              :watcher => @output_io)
         @error_io.close
-        logger.trace("stop: error_io watcher detached",
-                     :watcher => @error_io)
+        # logger.trace("stop: error_io watcher detached",
+        #              :watcher => @error_io)
         @pid = nil
       end
 
@@ -111,8 +111,8 @@ module Droonga
           on_read_output.call(data)
         end
         @loop.attach(@output_io)
-        logger.trace("capture_output: new output_io watcher attached",
-                     :watcher => @output_io)
+        # logger.trace("capture_output: new output_io watcher attached",
+        #              :watcher => @output_io)
 
         error_line_buffer = LineBuffer.new
         on_read_error = lambda do |data|
@@ -123,8 +123,8 @@ module Droonga
           on_read_error.call(data)
         end
         @loop.attach(@error_io)
-        logger.trace("capture_output: new error_io watcher attached",
-                     :watcher => @error_io)
+        # logger.trace("capture_output: new error_io watcher attached",
+        #              :watcher => @error_io)
 
         result
       end

  Modified: lib/droonga/worker_process_agent.rb (+8 -8)
===================================================================
--- lib/droonga/worker_process_agent.rb    2015-04-15 20:37:52 +0900 (af7dde7)
+++ lib/droonga/worker_process_agent.rb    2015-04-15 21:11:45 +0900 (403d6a2)
@@ -33,11 +33,11 @@ module Droonga
     def start
       logger.trace("start: start")
       @loop.attach(@input)
-      logger.trace("start: new input watcher attached",
-                   :watcher => @input)
+      # logger.trace("start: new input watcher attached",
+      #              :watcher => @input)
       @loop.attach(@output)
-      logger.trace("start: new output watcher attached",
-                   :watcher => @output)
+      # logger.trace("start: new output watcher attached",
+      #              :watcher => @output)
       logger.trace("start: done")
     end
 
@@ -48,15 +48,15 @@ module Droonga
         output.write(Messages::FINISH)
         output.on_write_complete do
           output.close
-          logger.trace("stop: output watcher detached",
-                       :watcher => output)
+          # logger.trace("stop: output watcher detached",
+          #              :watcher => output)
         end
       end
       if @input
         @input, input = nil, @input
         input.close
-        logger.trace("stop: input watcher detached",
-                     :watcher => input)
+        # logger.trace("stop: input watcher detached",
+        #              :watcher => input)
       end
       logger.trace("stop: done")
     end
-------------- next part --------------
HTML����������������������������...
ダウンロード 



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