diff --git a/moha.php b/moha.php index 20b60a6..d9268ab 100644 --- a/moha.php +++ b/moha.php @@ -25,8 +25,8 @@ $events = array(); // list of event objects $changed = array(); // list of changed devices $dbInit = false; // flag to indicate that desvices db is initialized $connected = false; // connected to MQTT server -$nSubscribed = 0; // Number of topics subsribed $included = false; // flag indicate scripts are loaded +$nSubscribed = 0; // Number of topics subsribed $logFh = null; // filehandle of log file // topics definition @@ -47,10 +47,11 @@ $client = new Mosquitto\Client(); // log levels define( "DEBUG", $client->LOG_DEBUG); -define( "INFO", 1); -define( "WARNING", 3); -define( "ERROR", 4); -$logLevel = LOG_DEBUG; +define( "INFO", $client->LOG_INFO); +define( "NOTICE", $client->LOG_NOTICE); +define( "WARNING", $client->LOG_WARNING); +define( "ERROR", $client->LOG_ERR); +$logLevel = DEBUG; // defining callback functions $client->onConnect('connectResponse');