TIM SDK
TIM API C
|
|
Logging.
Data Structures | |
struct | ta_s_log_record_stack_trace |
Read-only log record stack trace. More... | |
struct | ta_s_log_record |
Read-only log record. More... | |
Typedefs | |
typedef enum ta_e_log_level | ta_e_log_level_t |
Log levels. | |
typedef struct ta_s_log_record_stack_trace | ta_s_log_record_stack_trace_t |
Read-only log record stack trace. | |
typedef struct ta_s_log_record | ta_s_log_record_t |
Read-only log record. | |
typedef void(* | ta_cb_publish_log_record) (const ta_s_log_record_t *record, void *user_pointer) |
Callback to publish log record. More... | |
Enumerations | |
enum | ta_e_log_level { ta_c_ll_off , ta_c_ll_severe , ta_c_ll_warning , ta_c_ll_info , ta_c_ll_fine , ta_c_ll_finest } |
Log levels. More... | |
Functions | |
void | ta_logger_set_global_logger (ta_cb_publish_log_record callback, void *user_pointer) |
Set custom global logger callback. More... | |
typedef void( * ta_cb_publish_log_record) (const ta_s_log_record_t *record, void *user_pointer) |
Callback to publish log record.
[in] | record | Log record. |
[in] | user_pointer | User pointer used while setting the callback. |
enum ta_e_log_level |
void ta_logger_set_global_logger | ( | ta_cb_publish_log_record | callback, |
void * | user_pointer | ||
) |
Set custom global logger callback.
If not null-pointer the callback is used whenever the global logger needs to publish a new log record. The global logger is used when no terminal function is used, hence any function not of ta_terminal_*. You can use the same logger for both global and terminal specific logging. If no custom terminal logger is set the global one is used if set.
[in] | callback | Callback to set. Can be null-pointer to disable. |
[in] | user_pointer | User pointer to use in the callback. |