a lot of debug
This commit is contained in:
14
utils.php
14
utils.php
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
logger(DEBUG, _("Including utils.php"), __FILE__ . ":" . __LINE__);
|
||||
////logger(DEBUG, _("Including utils.php"), __FILE__ . ":" . __LINE__);
|
||||
|
||||
function bool2string($var)
|
||||
{
|
||||
@ -64,15 +64,15 @@ function getDevice($topic, $fn)
|
||||
$var = $var[$tmp];
|
||||
}else
|
||||
{
|
||||
logger(ERROR, sprintf(_("level %s of %s do not exists in %s"), $tmp, $fn, $topic), __FILE__ . ":" . __LINE__ );
|
||||
////logger(ERROR, sprintf(_("level %s of %s do not exists in %s"), $tmp, $fn, $topic), __FILE__ . ":" . __LINE__ );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
logger(DEBUG, sprintf(_("returning a value")), __FILE__ . ":" . __LINE__ );
|
||||
////logger(DEBUG, sprintf(_("returning a value")), __FILE__ . ":" . __LINE__ );
|
||||
return $var["device"];
|
||||
}else
|
||||
{
|
||||
logger(ERROR, sprintf(_("Topic %s do not exists"), $topic), __FILE__ . ":" . __LINE__ );
|
||||
////logger(ERROR, sprintf(_("Topic %s do not exists"), $topic), __FILE__ . ":" . __LINE__ );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -84,11 +84,11 @@ function getValue($ieeeAddress, $property)
|
||||
if (array_key_exists($property, $indexDevices[$ieeeAddress]->properties))
|
||||
{
|
||||
$r = $indexDevices[$ieeeAddress]->properties[$property]["value"];
|
||||
logger(DEBUG, "device: " . $indexDevices[$ieeeAddress]->friendlyName . " value: " . $r, __FILE__ . ":" . __LINE__ );
|
||||
//logger(DEBUG, "device: " . $indexDevices[$ieeeAddress]->friendlyName . " value: " . $r, __FILE__ . ":" . __LINE__ );
|
||||
}else
|
||||
{
|
||||
$r = false;
|
||||
logger(ERROR, "device: " . $indexDevices[$ieeeAddress]->friendlyName . "property " . $property . "does not exists", __FILE__ . ":" . __LINE__ );
|
||||
//logger(ERROR, "device: " . $indexDevices[$ieeeAddress]->friendlyName . "property " . $property . "does not exists", __FILE__ . ":" . __LINE__ );
|
||||
}
|
||||
return $r;
|
||||
}
|
||||
@ -99,7 +99,7 @@ function setValue($fn, $property, $value)
|
||||
$indexDevices[$ieeeAddress]->properties[$property]["value"] = $value;
|
||||
}
|
||||
|
||||
logger(DEBUG, _("signal handling"), __FILE__ . ":" . __LINE__, false);
|
||||
//logger(DEBUG, _("signal handling"), __FILE__ . ":" . __LINE__, false);
|
||||
//signal handling
|
||||
function signalHandler($signal)
|
||||
{
|
||||
|
Reference in New Issue
Block a user