Mstdlib-1.24.0
|
Functions | |
M_log_error_t | M_log_module_add_android (M_log_t *log, const char *product, size_t max_queue_bytes, M_log_module_t **out_mod) |
M_log_error_t | M_log_module_android_set_tag_priority (M_log_t *log, M_log_module_t *module, M_uint64 tags, M_android_log_priority_t priority) |
Functions to enable logging to Android logging subsystem (__android_log_write).
Only available when building for the Android platform.
M_log_error_t M_log_module_add_android | ( | M_log_t * | log, |
const char * | product, | ||
size_t | max_queue_bytes, | ||
M_log_module_t ** | out_mod | ||
) |
Add a module to output to Android logging subsystem (if we're building for Android).
Note: Android logging messages may be truncated by the subsystem to an implementation-specific line length limit (usually 1023 chars).
Android logging allows passing a NULL
or empty string for the product name - in this case, the "global" product name is used, not the name of the program like in syslog.
If the library wasn't compiled for Android, this function will return M_LOG_MODULE_UNSUPPORTED when called, and no module will be added to the logger.
[in] | log | logger object |
[in] | product | short tag string: name of program, or NULL to use "global" tag |
[in] | max_queue_bytes | max size of queue used to buffer asynchronous writes to android log |
[out] | out_mod | handle for created module, or NULL if there was an error |
M_log_error_t M_log_module_android_set_tag_priority | ( | M_log_t * | log, |
M_log_module_t * | module, | ||
M_uint64 | tags, | ||
M_android_log_priority_t | priority | ||
) |
Associate the given user-defined tag(s) with an Android log priority.
If you don't associate a tag with an Android log priority, the default priority of M_ANDROID_LOG_INFO will be used for that tag.
[in] | log | logger object |
[in] | module | handle of module to operate on |
[in] | tags | user-defined power-of-two tag (or multiple power-of-two tags, OR'd together) |
[in] | priority | single priority value to associate with the given tags |