Mstdlib-1.24.0
|
Functions | |
M_log_error_t | M_log_module_add_syslog (M_log_t *log, const char *product, M_syslog_facility_t facility, size_t max_queue_bytes, M_log_module_t **out_mod) |
M_log_error_t | M_log_module_syslog_set_tag_priority (M_log_t *log, M_log_module_t *module, M_uint64 tags, M_syslog_priority_t priority) |
Functions to enable logging to a local syslog server.
Only available on some platforms.
Note: syslog messages are limited to 1024 chars / line. Lines longer than this will be truncated.
M_log_error_t M_log_module_add_syslog | ( | M_log_t * | log, |
const char * | product, | ||
M_syslog_facility_t | facility, | ||
size_t | max_queue_bytes, | ||
M_log_module_t ** | out_mod | ||
) |
Add a module to output to syslog (if supported by this platform).
Note: syslog messages are limited to 1024 chars / line. Lines longer than this will be truncated.
If the library wasn't compiled with syslog support, 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 passed to syslog: if NULL , will be set to program name |
[in] | facility | facility type to associate with all log messages, gets passed directly to syslog |
[in] | max_queue_bytes | max size of queue used to buffer asynchronous writes to syslog |
[out] | out_mod | handle for created module, or NULL if there was an error |
M_log_error_t M_log_module_syslog_set_tag_priority | ( | M_log_t * | log, |
M_log_module_t * | module, | ||
M_uint64 | tags, | ||
M_syslog_priority_t | priority | ||
) |
Associate the given user-defined tag(s) with a syslog priority.
If you don't associate a tag with a syslog priority, the default priority of M_SYSLOG_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 |