Fix issue submitting batched events
This commit is contained in:
@@ -41,9 +41,10 @@ class LogDbClient
|
|||||||
case 'http':
|
case 'http':
|
||||||
$url = $this->server . "/api/logdb/v1/create-event";
|
$url = $this->server . "/api/logdb/v1/create-event";
|
||||||
if (!str_starts_with($url, "http")) $url = "http://{$url}";
|
if (!str_starts_with($url, "http")) $url = "http://{$url}";
|
||||||
$this->sendHttp(json_encode($event), $url);
|
$this->sendHttp(json_encode($events), $url);
|
||||||
break;
|
break;
|
||||||
case 'udp':
|
case 'udp':
|
||||||
|
// TODO set batch id, the server is unaware that this is a batch.
|
||||||
foreach ($events as $event) {
|
foreach ($events as $event) {
|
||||||
if ($event instanceof LogEvent) {
|
if ($event instanceof LogEvent) {
|
||||||
[$ip,$port] = explode(":", $this->server, 2);
|
[$ip,$port] = explode(":", $this->server, 2);
|
||||||
|
|||||||
Reference in New Issue
Block a user