18 #define AFW_IMPLEMENTATION_ID "syslog"
25 static const int afw_syslog_map[] = {
53 static const afw_utf8_t impl_factory_description =
59 &impl_afw_log_factory_inf,
61 &impl_factory_description
69 return &impl_afw_log_factory;
84 int facility = LOG_DAEMON;
85 char *identifier = NULL;
90 openlog(identifier, LOG_PID, facility);
102 impl_afw_log_factory_create_log_cede_p (
117 impl_afw_log_destroy(
138 impl_afw_log_set_own_mask(
164 syslog_priority = afw_syslog_map[priority];
Adaptive Framework Core API.
AFW_DEFINE(const afw_object_t *)
Interface afw_interface implementation declares.
Helpers for log implementation development.
Interface afw_interface implementation declares.
#define AFW_UTF8_FMT_ARG(A_STRING)
Convenience Macro for use with AFW_UTF8_FMT to specify arg.
#define AFW_UTF8_LITERAL(A_STRING)
String literal initializer.
int afw_log_priority_mask_t
#define AFW_UTF8_FMT
Format string specifier used for afw_utf8_t.
afw_utf8_octet_t afw_utf8_z_t
NFC normalized UTF-8 null terminated string.
enum afw_log_priority_e afw_log_priority_t
Log levels. See afw_log.h for more information.
@ afw_log_priority_trace3
@ afw_log_priority_trace8
@ afw_log_priority_trace4
@ afw_log_priority_notice
@ afw_log_priority_trace2
@ afw_log_priority_trace5
@ afw_log_priority_trace7
@ afw_log_priority_trace6
@ afw_log_priority_warning
@ afw_log_priority_trace1
void impl_afw_log_write(const afw_log_t *instance, afw_log_priority_t priority, const afw_utf8_z_t *source_z, const afw_utf8_t *message, afw_xctx_t *xctx)
afw_log_impl_create_cede_p(const afw_log_inf_t *inf, afw_size_t instance_size, const afw_object_t *properties, const afw_pool_t *p, afw_xctx_t *xctx)
Developers should call this in all create functions for afw_log.
afw_os_log_create(const afw_object_t *properties, const afw_pool_t *p, afw_xctx_t *xctx)
Create an instance of the OS log.
afw_os_log_factory_get()
Get the factory for OS log.
#define afw_pool_release(instance, xctx)
Call method release of interface afw_pool.
Interface afw_log_factory public struct.
Struct for afw_log_impl_t.
afw_log_priority_mask_t mask
Interface afw_log public struct.
Interface afw_object public struct.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Interface afw_xctx public struct.