[Ovirt-devel] [PATCH server] Log broker connect/disconnect.

Ian Main imain at redhat.com
Wed Apr 15 18:30:56 UTC 2009


This patch makes dbomatic log agent connect/disconnect and also fixes
a formatting bug in an exception.

Signed-off-by: Ian Main <imain at redhat.com>
---
 src/db-omatic/db_omatic.rb |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb
index 7ae08da..e043a6f 100755
--- a/src/db-omatic/db_omatic.rb
+++ b/src/db-omatic/db_omatic.rb
@@ -412,7 +412,7 @@ class DbOmatic < Qpid::Qmf::Console
         begin
            VmVnc.deallocate_all
          rescue Exception => e # just log any errors here
-            @logger.error "Error with closing all VM VNCs operation: " + e
+            @logger.error "Error with closing all VM VNCs operation: #{e.message}"
          end
 
         db_vm = Vm.find(:all)
@@ -423,6 +423,14 @@ class DbOmatic < Qpid::Qmf::Console
         end
     end
 
+    def broker_connected(broker)
+        @logger.info "Connected to broker."
+    end
+
+    def broker_disconnected(broker)
+        @logger.error "Broker disconnected."
+    end
+
 
     # This is the mainloop that is called into as a separate thread.  This just loops through
     # and makes sure all the agents are still reporting.  If they aren't they get marked as
-- 
1.6.0.6




More information about the ovirt-devel mailing list