add more logs
parent
e1877d6761
commit
baafedbf88
|
@ -85,13 +85,17 @@ $mqtt->onMessage(function ($message) use (
|
||||||
$payload["timestamp"] = time();
|
$payload["timestamp"] = time();
|
||||||
$data[] = $payload;
|
$data[] = $payload;
|
||||||
$news = true;
|
$news = true;
|
||||||
|
$v = [];
|
||||||
|
foreach ($$payload["labels"] as $key => $value) {
|
||||||
|
$v[] = $key . "=" . $value;
|
||||||
|
}
|
||||||
logit(
|
logit(
|
||||||
"got message for " .
|
"got message for " .
|
||||||
$payload["name"] .
|
$payload["name"] .
|
||||||
": " .
|
": " .
|
||||||
implode(", ", $payload["labels"]) .
|
implode(", ", $payload["labels"]) .
|
||||||
" with value " .
|
" with value " .
|
||||||
$payload["value"]
|
implode(", ", $v)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue