1
0

added constants to mosquitto log levels

This commit is contained in:
daniel Tartavel 2022-01-02 13:17:51 +01:00
parent 383fa96ee7
commit dcf340a7da

View File

@ -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');