debugging
This commit is contained in:
@ -26,31 +26,31 @@ class hook
|
||||
{
|
||||
foreach ($this->devicelist as $ieeeAddress => $property2change)
|
||||
{
|
||||
logger(DEBUG, _("Device: ") . $ieeeAddress);
|
||||
logger(DEBUG, _("Device: ") . $ieeeAddress, __FILE__ . ":" . __LINE__);
|
||||
if ($property2change[1] === false)
|
||||
{
|
||||
logger(DEBUG, _("Trying to store callback"));
|
||||
logger(DEBUG, _("Trying to store callback"), __FILE__ . ":" . __LINE__);
|
||||
if (isset($indexDevices[$ieeeAddress]))
|
||||
{
|
||||
$property = $property2change[0];
|
||||
$indexDevices[$ieeeAddress]->$property["functions"][] = array($this,"callback");
|
||||
$property2change[1] = true;
|
||||
logger(DEBUG, sprintf(_("Property '%s' is initialized with callback"), $property2change[0]));
|
||||
logger(DEBUG, sprintf(_("Property '%s' is initialized with callback"), $property2change[0]), __FILE__ . ":" . __LINE__);
|
||||
}else
|
||||
{
|
||||
logger(WARNING, sprintf(_("Hook %s can not initialize Property '%s' of device %s"), $this->hookName, $property2change[0], $ieeeAddress));
|
||||
logger(WARNING, sprintf(_("Hook %s can not initialize Property '%s' of device %s"), $this->hookName, $property2change[0], $ieeeAddress), __FILE__ . ":" . __LINE__);
|
||||
$result = false;
|
||||
}
|
||||
}else
|
||||
{
|
||||
logger(DEBUG, _("Callback already installed"));
|
||||
logger(DEBUG, _("Callback already installed"), __FILE__ . ":" . __LINE__);
|
||||
}
|
||||
}
|
||||
//echo "result => "; var_dump($result);
|
||||
if ($result === true)
|
||||
{
|
||||
$this->initialized = true;
|
||||
logger(DEBUG, $this->hookName . (" initialized"));
|
||||
logger(DEBUG, $this->hookName . _(" initialized"), __FILE__ . ":" . __LINE__);
|
||||
//var_dump($this);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user