]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
more logging in stompqueuemanager
authorEvan Prodromou <evan@controlyourself.ca>
Thu, 2 Jul 2009 16:43:09 +0000 (12:43 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Thu, 2 Jul 2009 16:43:09 +0000 (12:43 -0400)
lib/stompqueuemanager.php

index badcd4abb0fee788afc579b9940c85a7452f7da8..08a5790d418e47e7e2b716f8e734e79f097ab102 100644 (file)
@@ -49,10 +49,14 @@ class StompQueueManager
 
     function _connect()
     {
+        $this->_log(LOG_DEBUG, "Connecting to $this->server...");
         if (empty($this->con)) {
+            $this->_log(LOG_INFO, "Connecting to '$this->server' as '$this->username'...");
             $this->con = new Stomp($this->server);
 
-            if (!$this->con->connect($this->username, $this->password)) {
+            if ($this->con->connect($this->username, $this->password)) {
+                $this->_log(LOG_INFO, "Connected.");
+            } else {
                 $this->_log(LOG_ERR, 'Failed to connect to queue server');
                 throw new ServerException('Failed to connect to queue server');
             }
@@ -160,4 +164,9 @@ class StompQueueManager
         $k = $this->_frameKey($notice, $queue);
         unset($this->_frames[$k]);
     }
+
+    function _log($level, $msg)
+    {
+        common_log($level, 'StompQueueManager: '.$msg);
+    }
 }