emit

abstract fun emit(logs: List<JsonObject>, onSuccess: () -> Unit, onFailed: (Throwable) -> Unit)

Emits a batch of logs to their destination.

This abstract method must be implemented by concrete subclasses to define how batches of logs are sent to their final destination. Unlike the emit method from PureeOutput which handles single logs, this method processes multiple logs at once for more efficient delivery.

Parameters

logs

The list of logs serialized in JSON format to be emitted

onSuccess

Callback to be invoked when the batch is successfully delivered

onFailed

Callback to be invoked with the exception when delivery fails


override fun emit(log: JsonObject)

Stores the log instead of emitting immediately