more logging in stompqueuemanager
This commit is contained in:
parent
5f9a4ebef4
commit
e8f27025ba
|
@ -49,10 +49,14 @@ class StompQueueManager
|
||||||
|
|
||||||
function _connect()
|
function _connect()
|
||||||
{
|
{
|
||||||
|
$this->_log(LOG_DEBUG, "Connecting to $this->server...");
|
||||||
if (empty($this->con)) {
|
if (empty($this->con)) {
|
||||||
|
$this->_log(LOG_INFO, "Connecting to '$this->server' as '$this->username'...");
|
||||||
$this->con = new Stomp($this->server);
|
$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');
|
$this->_log(LOG_ERR, 'Failed to connect to queue server');
|
||||||
throw new ServerException('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);
|
$k = $this->_frameKey($notice, $queue);
|
||||||
unset($this->_frames[$k]);
|
unset($this->_frames[$k]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _log($level, $msg)
|
||||||
|
{
|
||||||
|
common_log($level, 'StompQueueManager: '.$msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user