Skip to main content

set_log_callback

Function set_log_callback 

Source
pub fn set_log_callback<F>(callback: F) -> Result<()>
where F: Fn(LogRecord) -> bool + Send + Sync + 'static,
Expand description

Installs or replaces the process-global MapLibre Native log callback.

MapLibre Native may invoke the callback from logging or worker threads. The callback state must therefore be Send + Sync + 'static. The callback should return quickly and avoid calling MapLibre Native APIs. Panics are caught and reported to native logging as “not consumed”.