MapLibre Native C API
Public C ABI for the MapLibre Native wrapper.
Loading...
Searching...
No Matches
logging.h
Go to the documentation of this file.
1
5
6#ifndef MAPLIBRE_NATIVE_C_LOGGING_H
7#define MAPLIBRE_NATIVE_C_LOGGING_H
8
9#include <stdint.h>
10
11#include "base.h"
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
23
38
40typedef uint32_t mln_log_severity_flags;
41
62
74typedef void (*mln_log_callback)(
75 void* user_data, mln_log_severity severity, mln_log_event event, int64_t code,
76 mln_buffer_view message
77);
78
80typedef struct mln_log_handler {
81 uint32_t size;
83 void* user_data MLN_BINDING("kind=context");
85 mln_delivery_queue queue MLN_BINDING("kind=delivery_queue");
92} mln_log_handler MLN_BINDING(
93 "kind=callback_registration;release=release_user_data"
94);
95
102 const mln_log_handler* handler, mln_diagnostic* out_diagnostic
103) MLN_NOEXCEPT;
104
106MLN_API mln_status
107mln_log_clear_callback(mln_diagnostic* out_diagnostic) MLN_NOEXCEPT;
108
116 mln_log_severity_flags mask, mln_diagnostic* out_diagnostic
117) MLN_NOEXCEPT;
118
119#ifdef __cplusplus
120}
121#endif
122
123#endif // MAPLIBRE_NATIVE_C_LOGGING_H
uint64_t mln_delivery_queue
Definition base.h:169
void(*) mln_user_data_release(void *user_data)
Definition base.h:191
mln_status
Definition base.h:41
mln_status mln_log_clear_callback(mln_diagnostic *out_diagnostic)
mln_status mln_log_set_callback(const mln_log_handler *handler, mln_diagnostic *out_diagnostic)
void(*) mln_log_callback(void *user_data, mln_log_severity severity, mln_log_event event, int64_t code, mln_buffer_view message)
Definition logging.h:74
mln_log_severity
Definition logging.h:18
@ MLN_LOG_SEVERITY_INFO
Definition logging.h:19
@ MLN_LOG_SEVERITY_ERROR
Definition logging.h:21
@ MLN_LOG_SEVERITY_WARNING
Definition logging.h:20
uint32_t mln_log_severity_flags
Definition logging.h:40
mln_status mln_log_set_async_severity_mask(mln_log_severity_flags mask, mln_diagnostic *out_diagnostic)
mln_log_severity_flag
Definition logging.h:25
@ MLN_LOG_SEVERITY_FLAG_ALL
Definition logging.h:35
@ MLN_LOG_SEVERITY_FLAG_INFO
Definition logging.h:26
@ MLN_LOG_SEVERITY_FLAG_DEFAULT
Definition logging.h:33
@ MLN_LOG_SEVERITY_FLAG_ERROR
Definition logging.h:28
@ MLN_LOG_SEVERITY_FLAG_WARNING
Definition logging.h:27
mln_log_event
Definition logging.h:43
@ MLN_LOG_EVENT_SETUP
Definition logging.h:45
@ MLN_LOG_EVENT_GLYPH
Definition logging.h:59
@ MLN_LOG_EVENT_GRAPHICS_BACKEND
Definition logging.h:55
@ MLN_LOG_EVENT_GENERAL
Definition logging.h:44
@ MLN_LOG_EVENT_PARSE_TILE
Definition logging.h:48
@ MLN_LOG_EVENT_JNI
Definition logging.h:56
@ MLN_LOG_EVENT_PARSE_STYLE
Definition logging.h:47
@ MLN_LOG_EVENT_ANDROID
Definition logging.h:57
@ MLN_LOG_EVENT_IMAGE
Definition logging.h:54
@ MLN_LOG_EVENT_SHADER
Definition logging.h:46
@ MLN_LOG_EVENT_RENDER
Definition logging.h:49
@ MLN_LOG_EVENT_SPRITE
Definition logging.h:53
@ MLN_LOG_EVENT_DATABASE
Definition logging.h:51
@ MLN_LOG_EVENT_CRASH
Definition logging.h:58
@ MLN_LOG_EVENT_STYLE
Definition logging.h:50
@ MLN_LOG_EVENT_HTTP_REQUEST
Definition logging.h:52
@ MLN_LOG_EVENT_TIMING
Definition logging.h:60
Definition base.h:178
Definition base.h:84
Definition logging.h:80
mln_log_callback callback
Definition logging.h:82
mln_user_data_release release_user_data
Definition logging.h:84
void * user_data
Definition logging.h:83
mln_delivery_queue queue
Definition logging.h:85
mln_log_severity_flags platform_severities
Definition logging.h:91
uint32_t size
Definition logging.h:81