summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-07-02 12:43:09 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-07-02 12:43:09 -0400
commite8f27025ba7869057d86fe37a5264e1c742969f5 (patch)
tree2fbf98645c54e6902dfc762ff59666148cb73d32 /lib
parent5f9a4ebef493997557ef4470268bed0e5799b6cb (diff)
more logging in stompqueuemanager
Diffstat (limited to 'lib')
-rw-r--r--lib/stompqueuemanager.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/stompqueuemanager.php b/lib/stompqueuemanager.php
index badcd4abb..08a5790d4 100644
--- a/lib/stompqueuemanager.php
+++ b/lib/stompqueuemanager.php
@@ -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);
+ }
}