Adaptive Framework
0.9.0
|
Files | |
file | afw_trace.h |
Adaptive Framework Software Trace Header. | |
Macros | |
#define | AFW_TRACE_STATIC_TRACE_ID(label, trace_id) |
Define a static trace_id rti. More... | |
#define | afw_trace(trace_level, flag_index, instance, message, xctx) |
If applicable, write trace. More... | |
#define | afw_trace_fz(trace_level, flag_index, instance, xctx, format_z, ...) |
If applicable, write trace using a printf style format. More... | |
#define | afw_trace_vz(trace_level, flag_index, instance, format_z, ap, xctx) |
If applicable, write trace using a printf style format and va_list. More... | |
#define | afw_trace_z(trace_level, flag_index, instance, message_z, xctx) |
If applicable, write trace from zero terminate string. More... | |
Functions | |
void | afw_trace_write (afw_log_priority_t priority, const afw_interface_implementation_rti_t *rti, const afw_utf8_z_t *source_z, const afw_utf8_t *message, afw_xctx_t *xctx) |
Write trace. More... | |
void | afw_trace_write_fz (afw_log_priority_t priority, const afw_interface_implementation_rti_t *rti, const afw_utf8_z_t *source_z, afw_xctx_t *xctx, const afw_utf8_z_t *format_z,...) |
Write trace using a printf style format. More... | |
void | afw_trace_write_vz (afw_log_priority_t priority, const afw_interface_implementation_rti_t *rti, const afw_utf8_z_t *source_z, const afw_utf8_z_t *format_z, va_list ap, afw_xctx_t *xctx) |
Write trace using a printf style format and va_list. More... | |
void | afw_trace_write_z (afw_log_priority_t priority, const afw_interface_implementation_rti_t *rti, const afw_utf8_z_t *source_z, const afw_utf8_z_t *message_z, afw_xctx_t *xctx) |
Write trace from zero terminate string. More... | |
These macros and functions assist writing trace message to the environment log. All trace message have associated runtime information (rti) that can be used for prefixing messages as well as filtering. The first parameter of macros AFW_TRACE(), AFW_TRACE_Z(), AFW_TRACE_FZ(), and AFW_TRACE_VZ() is a instance, which is used to locate the implementation rti. The AFW_TRACE_WRITE*() macros and afw_trace_write*() functions have rti as the first parameter.
All trace message are written to the environment log. See afw_log.h for more information.
#define afw_trace | ( | trace_level, | |
flag_index, | |||
instance, | |||
message, | |||
xctx | |||
) |
If applicable, write trace.
trace_level | is a literal 1 - 8 added to "trace" to form log level. |
flag_index | of flag to check to determine if trace is applicable. |
instance | associated with trace message. |
message | to log. |
xctx | of caller. |
The trace_level 1 is the most commonly used level in Adaptive Framework. Use 2 - 8 when a particular trace benefits from a different log priority. For example, 2 - 8 could indicate more detail for a particular flag.
Definition at line 65 of file afw_trace.h.
#define afw_trace_fz | ( | trace_level, | |
flag_index, | |||
instance, | |||
xctx, | |||
format_z, | |||
... | |||
) |
If applicable, write trace using a printf style format.
trace_level | is a literal 1 - 8 added to "trace" to form log level. |
flag_index | of flag to check to determine if trace is applicable. |
instance | associated with trace message. |
xctx | of caller. |
format_z | for message to log. |
... | parameters for format. |
The trace_level 1 is the most commonly used level in Adaptive Framework. Use 2 - 8 when a particular trace benefits from a different log priority. For example, 2 - 8 could indicate more detail for a particular flag.
Definition at line 88 of file afw_trace.h.
#define AFW_TRACE_STATIC_TRACE_ID | ( | label, | |
trace_id | |||
) |
Define a static trace_id rti.
label | for the static trace_id rti. |
trace_id | The first parameter of afw_trace_write*() functions and AFW_TRACE_WRITE*() macros is an rti. This macro defines a static rti that can be passed to these for non-interface tracing. |
Definition at line 48 of file afw_trace.h.
#define afw_trace_vz | ( | trace_level, | |
flag_index, | |||
instance, | |||
format_z, | |||
ap, | |||
xctx | |||
) |
If applicable, write trace using a printf style format and va_list.
trace_level | is a literal 1 - 8 added to "trace" to form log level. |
flag_index | of flag to check to determine if trace is applicable. |
instance | associated with trace message. |
format_z | for message to log. |
ap | va_list for format. |
xctx | of caller. |
The trace_level 1 is the most commonly used level in Adaptive Framework. Use 2 - 8 when a particular trace benefits from a different log priority. For example, 2 - 8 could indicate more detail for a particular flag.
Definition at line 111 of file afw_trace.h.
#define afw_trace_z | ( | trace_level, | |
flag_index, | |||
instance, | |||
message_z, | |||
xctx | |||
) |
If applicable, write trace from zero terminate string.
trace_level | is a literal 1 - 8 added to "trace" to form log level. |
flag_index | of flag to check to determine if trace is applicable. |
instance | associated with trace message. |
message_z | to log. |
xctx | of caller. |
The trace_level 1 is the most commonly used level in Adaptive Framework. Use 2 - 8 when a particular trace benefits from a different log priority. For example, 2 - 8 could indicate more detail for a particular flag.
Definition at line 133 of file afw_trace.h.
void afw_trace_write | ( | afw_log_priority_t | priority, |
const afw_interface_implementation_rti_t * | rti, | ||
const afw_utf8_z_t * | source_z, | ||
const afw_utf8_t * | message, | ||
afw_xctx_t * | xctx | ||
) |
Write trace.
priority | is log priority for log message (afw_log_priority_t) |
rti | associated with trace message. |
source_z | file:line. |
message | to log. |
xctx | of caller. |
Normally afw_trace() should be called instead.
Definition at line 21 of file afw_trace.c.
void afw_trace_write_fz | ( | afw_log_priority_t | priority, |
const afw_interface_implementation_rti_t * | rti, | ||
const afw_utf8_z_t * | source_z, | ||
afw_xctx_t * | xctx, | ||
const afw_utf8_z_t * | format_z, | ||
... | |||
) |
Write trace using a printf style format.
priority | is log priority for log message (afw_log_priority_t) |
rti | associated with trace message. |
source_z | file:line. |
xctx | of caller. |
format_z | for message to log. |
... | parameters for format. |
Normally afw_trace_fz() should be called instead.
Definition at line 45 of file afw_trace.c.
void afw_trace_write_vz | ( | afw_log_priority_t | priority, |
const afw_interface_implementation_rti_t * | rti, | ||
const afw_utf8_z_t * | source_z, | ||
const afw_utf8_z_t * | format_z, | ||
va_list | ap, | ||
afw_xctx_t * | xctx | ||
) |
Write trace using a printf style format and va_list.
priority | is log priority for log message (afw_log_priority_t) |
rti | associated with trace message. |
source_z | file:line. |
format_z | for message to log. |
ap | va_list for format. |
xctx | of caller. |
Normally afw_trace_vz() should be called instead.
Definition at line 65 of file afw_trace.c.
void afw_trace_write_z | ( | afw_log_priority_t | priority, |
const afw_interface_implementation_rti_t * | rti, | ||
const afw_utf8_z_t * | source_z, | ||
const afw_utf8_z_t * | message_z, | ||
afw_xctx_t * | xctx | ||
) |
Write trace from zero terminate string.
priority | is log priority for log message (afw_log_priority_t) |
rti | associated with trace message. |
source_z | file:line. |
message_z | to log. |
xctx | of caller. |
Normally afw_trace_z() should be called instead.
Definition at line 81 of file afw_trace.c.