|
MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
|
#include <logging.h>
Data Fields | |
| mln_log_callback | callback |
| void * | user_data |
| mln_user_data_release | release_user_data |
| mln_delivery_queue | queue |
Process-global log callback or queue state.
The struct itself is borrowed for mln_log_set_callback(). Exactly one of callback and queue is set.
| mln_log_callback mln_log_handler::callback |
Receives each record.
Required in callback mode; null in queue mode.
| mln_delivery_queue mln_log_handler::queue |
Optional. Queue delivery: native code consumes each record and queues a copy as an MLN_DELIVERY_TYPE_LOG_RECORD delivery carrying user_data. A record the queue refuses, because the queue was released or the copy could not be allocated, goes to the platform logger instead. Replacing or clearing the handler queues one MLN_DELIVERY_TYPE_RETIRED delivery carrying user_data after the handler's final record. The queue's wake and wake release run inline on the logging thread, under the same restrictions as the log callback.
| mln_user_data_release mln_log_handler::release_user_data |
Optional. Releases user_data after the final callback returns, when the handler is replaced or cleared.
It runs on the thread that replaces or clears the handler, under the same restrictions as the callback. Null in queue mode.
| void* mln_log_handler::user_data |
Opaque host token in queue mode; native code never dereferences it.