TIM SDK
TIM API C
logging.h File Reference

Description

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 Documentation

◆ ta_cb_publish_log_record

typedef void( * ta_cb_publish_log_record) (const ta_s_log_record_t *record, void *user_pointer)

Callback to publish log record.

Parameters
[in]recordLog record.
[in]user_pointerUser pointer used while setting the callback.

Enumeration Type Documentation

◆ ta_e_log_level

Log levels.

Enumerator
ta_c_ll_off 

Disable.

ta_c_ll_severe 

Severe error.

ta_c_ll_warning 

Warning.

ta_c_ll_info 

Information.

ta_c_ll_fine 

Fine debug details.

ta_c_ll_finest 

Finest debug details.

Function Documentation

◆ ta_logger_set_global_logger()

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.

Parameters
[in]callbackCallback to set. Can be null-pointer to disable.
[in]user_pointerUser pointer to use in the callback.