Commit 7755612

mokha <mokha@cisco.com>
2019-03-03 20:51:35
add debug logging.
1 parent 263ce66
Changed files (2)
lib/minbox/cli.rb
@@ -36,23 +36,6 @@ module Minbox
       def version
         say Minbox::VERSION
       end
-
-      private
-
-      def publishers_for(output)
-        publisher = Publisher.new
-        output.each do |x|
-          case x
-          when 'stdout'
-            publisher.add(LogPublisher.new)
-          when 'redis'
-            publisher.add(RedisPublisher.new)
-          when 'file'
-            publisher.add(FilePublisher.new)
-          end
-        end
-        publisher
-      end
     end
   end
 end
lib/minbox/client.rb
@@ -81,11 +81,14 @@ module Minbox
     end
 
     def write(message)
+      logger.debug message
       socket.puts message
     end
 
     def read
-      socket.gets
+      line = socket.gets
+      logger.debug line
+      line
     end
 
     def close