postLog

fun <T : PureeLog> postLog(log: T, platformClass: PlatformClass<T>)

Posts a log entry to be processed and routed to configured outputs.

This method serializes the log, applies all configured filters, and sends the processed log to all registered outputs for the log type. The processing is done asynchronously in the configured coroutine dispatcher.

Note: This method requires a PlatformClass parameter, which is platform-specific. It is recommended to use the platform-specific send extension function instead:

  • On Android: pureeLogger.send(log) (uses reified type parameters)

  • On iOS: pureeLogger.send(log, clazz) (requires Objective-C class reference)

Parameters

T

The type of log being posted, must extend PureeLog

log

The log instance to be processed

platformClass

Platform-specific class information for the log type

Throws

If the log type is not registered with the logger