ditto / live.ditto / DittoLogger / setCustomLogCallback

setCustomLogCallback

fun setCustomLogCallback(logCallback: ((<ERROR CLASS>, String) -> Unit)?): Unit

Registers a callback for a fully customizable way of handling log "events" from the logger (on top of logging to the console, and to a file, if any).

Parameters

logCallback - a callback that can be null, in which case the current callback, if any, is unregistered. Otherwise it is called each time a log statement is issued by Ditto (after filtering by log level).

@JvmStatic fun setCustomLogCallback(logCb: DittoLogCallback): Unit

Registers a callback for a fully customizable way of handling log "events" from the logger (on top of logging to the console, and to a file, if any).

Version to be used when interacting with the SDK from Java.

Parameters

logCallback - a callback that can't be null. It is called each time a log statement is issued by Ditto (after filtering by log level).