write debug to log
parent
13a23d43ad
commit
55989ff7f6
|
@ -64,7 +64,6 @@ $mqtt->onMessage(function ($message) use (
|
||||||
&$news,
|
&$news,
|
||||||
&$globalCounter,
|
&$globalCounter,
|
||||||
&$isRunning,
|
&$isRunning,
|
||||||
$mqtt,
|
|
||||||
$mqttTopic
|
$mqttTopic
|
||||||
) {
|
) {
|
||||||
if ($mqttTopic . "/restart" === $message->topic) {
|
if ($mqttTopic . "/restart" === $message->topic) {
|
||||||
|
@ -72,17 +71,13 @@ $mqtt->onMessage(function ($message) use (
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($mqttTopic . "/debug" === $message->topic) {
|
if ($mqttTopic . "/debug" === $message->topic) {
|
||||||
$mqtt->publish(
|
logit(
|
||||||
$mqttTopic . "/debugmsg",
|
json_encode(
|
||||||
strval(
|
$data,
|
||||||
json_encode(
|
JSON_UNESCAPED_SLASHES +
|
||||||
$data,
|
JSON_UNESCAPED_UNICODE +
|
||||||
JSON_UNESCAPED_SLASHES +
|
JSON_PRETTY_PRINT
|
||||||
JSON_UNESCAPED_UNICODE +
|
)
|
||||||
JSON_PRETTY_PRINT
|
|
||||||
)
|
|
||||||
),
|
|
||||||
2
|
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue