added constants to mosquitto log levels
This commit is contained in:
parent
383fa96ee7
commit
dcf340a7da
11
moha.php
11
moha.php
@ -25,8 +25,8 @@ $events = array(); // list of event objects
|
|||||||
$changed = array(); // list of changed devices
|
$changed = array(); // list of changed devices
|
||||||
$dbInit = false; // flag to indicate that desvices db is initialized
|
$dbInit = false; // flag to indicate that desvices db is initialized
|
||||||
$connected = false; // connected to MQTT server
|
$connected = false; // connected to MQTT server
|
||||||
$nSubscribed = 0; // Number of topics subsribed
|
|
||||||
$included = false; // flag indicate scripts are loaded
|
$included = false; // flag indicate scripts are loaded
|
||||||
|
$nSubscribed = 0; // Number of topics subsribed
|
||||||
$logFh = null; // filehandle of log file
|
$logFh = null; // filehandle of log file
|
||||||
|
|
||||||
// topics definition
|
// topics definition
|
||||||
@ -47,10 +47,11 @@ $client = new Mosquitto\Client();
|
|||||||
|
|
||||||
// log levels
|
// log levels
|
||||||
define( "DEBUG", $client->LOG_DEBUG);
|
define( "DEBUG", $client->LOG_DEBUG);
|
||||||
define( "INFO", 1);
|
define( "INFO", $client->LOG_INFO);
|
||||||
define( "WARNING", 3);
|
define( "NOTICE", $client->LOG_NOTICE);
|
||||||
define( "ERROR", 4);
|
define( "WARNING", $client->LOG_WARNING);
|
||||||
$logLevel = LOG_DEBUG;
|
define( "ERROR", $client->LOG_ERR);
|
||||||
|
$logLevel = DEBUG;
|
||||||
|
|
||||||
// defining callback functions
|
// defining callback functions
|
||||||
$client->onConnect('connectResponse');
|
$client->onConnect('connectResponse');
|
||||||
|
Loading…
Reference in New Issue
Block a user