init_logger

Function init_logger 

Source
pub fn init_logger(callback: Option<Arc<dyn LogCallback>>)
Expand description

Initialize the SDK logger

This function should be called once before creating any SDK clients. It initializes the tracing infrastructure for the SDK and optionally registers a callback to receive log events.

§Parameters

  • callback: Optional callback to receive SDK log events. Pass None to use only platform loggers (oslog on iOS, logcat on Android).

§Example

// Initialize with callback before creating clients
initLogger(FlightRecorderCallback())
val client = Client(tokenProvider, settings)

§Notes

  • This function can only be called once - subsequent calls are ignored
  • If not called explicitly, logging is auto-initialized when first client is created
  • Platform loggers (oslog/logcat) are always enabled regardless of callback