add more logs

master
Dirk Heilig 2024-09-23 11:50:08 +02:00
parent e1877d6761
commit baafedbf88
1 changed files with 5 additions and 1 deletions

View File

@ -85,13 +85,17 @@ $mqtt->onMessage(function ($message) use (
$payload["timestamp"] = time();
$data[] = $payload;
$news = true;
$v = [];
foreach ($$payload["labels"] as $key => $value) {
$v[] = $key . "=" . $value;
}
logit(
"got message for " .
$payload["name"] .
": " .
implode(", ", $payload["labels"]) .
" with value " .
$payload["value"]
implode(", ", $v)
);
});