GELF - retrieve record id

Is there a way to retrieve the elasticsearch record ID after the log has been submitted via GELF?

$transport = new TcpTransport("", 12201);
$publisher = new Publisher();
$message = new Message();


I’m not exactly sure what ID you looking for so I’ll give you a couple examples.

Message ID

Elasticsearch scroll command.

curl -X GET "localhost:9200/_search?scroll=1m&pretty" -H 'Content-Type: application/json' -d'
  "sort": [


To help you further, some more information about what you want or some examples would be appreciated.

Hope that helps

hi gsmith. thanks for the reply.

i’d like to retrieve the ID right after it has been submitted/published.



something like,

$getRecordID = $publisher->publish($message);
return $getRecordID;


I’m unfamiliar with what your doing. I was wondering if you could enlighten me or demonstrate how your executing these commands for Elasticsearch.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.