Open intermittentnrg opened 1 month ago
Should not be too difficult to implement, the steps for someone that wants to submit a PR would be as follows:
batch
method to HTTP Appender that like log
takes an array of messages. For an example, see https://github.com/reidmorrison/semantic_logger/blob/f7d54bf21b6900f334155882ffd6ab287ffa58f5/lib/semantic_logger/appender/elasticsearch.rb#L167batch
method to JSON Formatter to output the array of log entries as a single JSON entry. Similar to the call
method, except it takes an array of log entries. For an example, see: https://github.com/reidmorrison/semantic_logger/blob/f7d54bf21b6900f334155882ffd6ab287ffa58f5/lib/semantic_logger/formatters/signalfx.rb#L111As mentioned above, all that should be needed next is to set batch: true
when creating the appender instance, which should automatically create an appender thread and send the log messages in batches.
The http appender could support batch to send multiple log entries to filebeat http endpoint.
Seems simple enough? Should probably be off by default and enabled with
batch: true
.Would be nice to have.