56 #define afw_log_release afw_log_destroy
102 return 1 << priority;
114 return (1 << (priority + 1) ) - 1;
127 return ((1 << priority) & mask) != 0;
137 AFW_DEFINE_STATIC_INLINE(
void)
144 *mask |= (1 << priority);
148 *mask &= ~(1 << priority);
158 #define AFW_LOG(priority, message, xctx) \
159 afw_log_write(xctx->env->log, afw_log_priority_ ## priority, \
160 AFW__FILE_LINE__, message, xctx)
168 #define AFW_LOG_Z(priority, message_z, xctx) \
169 afw_log_write_z(xctx->env->log, afw_log_priority_ ## priority, \
170 AFW__FILE_LINE__, message_z, xctx)
180 #define AFW_LOG_VZ(priority, format_z, ap, xctx) \
181 afw_log_write_vz(xctx->env->log, afw_log_priority_ ## priority, \
182 AFW__FILE_LINE__, format_z, ap, xctx)
192 #define AFW_LOG_FZ(priority, xctx, format_z, ...) \
193 afw_log_write_fz(xctx->env->log, afw_log_priority_ ## priority, \
194 AFW__FILE_LINE__, xctx, format_z, __VA_ARGS__)
205 AFW_DEFINE_STATIC_INLINE(
void)
215 message.s = message_z;
216 message.len = strlen(message_z);
248 AFW_DEFINE_STATIC_INLINE(
void)
259 va_start(ap, format_z);
#define AFW_BEGIN_DECLARES
#define AFW_DECLARE(type)
Declare a public afw function.
Interfaceafw_interface header.
int afw_log_priority_mask_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.
#define afw_log_write(instance, priority, source_z, message, xctx)
Call method write of interface afw_log.
void afw_log_write_fz(const afw_log_t *instance, afw_log_priority_t priority, const afw_utf8_z_t *source_z, afw_xctx_t *xctx, const afw_utf8_z_t *format_z,...)
Log an message using a printf style format and parameters.
void afw_log_add_to_environment(const afw_log_t *instance, afw_xctx_t *xctx)
Add a log to the list of logs called by environment log.
void afw_log_write_z(const afw_log_t *instance, afw_log_priority_t priority, const afw_utf8_z_t *source_z, const afw_utf8_z_t *message_z, afw_xctx_t *xctx)
Log an afw_utf8_z_t message.
void afw_log_write_vz(const afw_log_t *instance, afw_log_priority_t priority, const afw_utf8_z_t *source_z, const afw_utf8_z_t *format_z, va_list ap, afw_xctx_t *xctx)
Log an message using a printf style format and va_list.
const afw_utf8_t * afw_log_priority_to_priority_id(afw_log_priority_t priority)
Convert a log priority to priority id.
afw_log_priority_t afw_log_priority_id_to_priority(const afw_utf8_t *priority_id)
Convert a log priority id to priority.
void afw_log_set_priority_in_mask(afw_log_priority_mask_t *mask, afw_log_priority_t priority, afw_boolean_t value)
Set the corresponding bit for a priority in a mask.
const afw_log_factory_t * afw_log_standard_factory_get()
Get the factory for log type standard.
const afw_log_priority_id_map_entry_t * afw_log_get_priority_id_map()
afw_boolean_t afw_log_priority_in_mask(afw_log_priority_mask_t mask, afw_log_priority_t priority)
Determined if log priority corresponding bit is on in mask.
const afw_log_factory_t * afw_log_file_factory_get()
Get the factory for log type file.
afw_log_priority_mask_t afw_log_up_to_priority_mask(afw_log_priority_t priority)
Get the priority mask for all equal or higher log priorities.
struct afw_log_priority_id_map_entry_s afw_log_priority_id_map_entry_t
afw_log_priority_mask_t afw_log_priority_mask(afw_log_priority_t priority)
Get the priority mask for a log priority.
Interface afw_log_factory public struct.
Interface afw_log public struct.
NFC normalized UTF-8 string.
Interface afw_xctx public struct.