From 0d517039448b45ccafbd714c2359de9c9a052145 Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Sun, 21 Sep 2025 22:08:57 +0200 Subject: [PATCH] Fix issue submitting batched events --- src/LogDbClient.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/LogDbClient.php b/src/LogDbClient.php index c60ce18..daafa83 100644 --- a/src/LogDbClient.php +++ b/src/LogDbClient.php @@ -41,9 +41,10 @@ class LogDbClient case 'http': $url = $this->server . "/api/logdb/v1/create-event"; if (!str_starts_with($url, "http")) $url = "http://{$url}"; - $this->sendHttp(json_encode($event), $url); + $this->sendHttp(json_encode($events), $url); break; case 'udp': + // TODO set batch id, the server is unaware that this is a batch. foreach ($events as $event) { if ($event instanceof LogEvent) { [$ip,$port] = explode(":", $this->server, 2);