Reads log message, appends log header and triggers log write callback function.
94 if (log_level > configlog_level)
107 if (log_write_cb == NULL)
122 va_start(args, format);
134 logbuf[logmsg_len] =
'\0';
142 log_write_cb(logbuf, logmsg_len);
#define ERROR_LOG_MSG
Definition: log.cpp:37
Definition: appd_iot_def.h:111
appd_iot_log_write_cb_t appd_iot_get_log_write_cb(void)
Get Log Write Callback Function Pointer.
Definition: config.cpp:184
appd_iot_log_level_t
Log Level Enums returned for all API calls.
Definition: appd_iot_def.h:94
static char loglevel_c[APPD_IOT_MAX_LOG_LEVELS]
Definition: log.cpp:39
#define LOG_HEADER_LEN
Definition: log.cpp:35
void(* appd_iot_log_write_cb_t)(const char *logmsg, size_t logmsg_len)
Log Write Callback implements the functionality to process log messages The callback implementation...
Definition: appd_iot_def.h:124
#define LOG_HEADER
Definition: log.cpp:34
#define LOG_MAX_SIZE
Definition: log.cpp:31
Definition: appd_iot_def.h:99
appd_iot_log_level_t appd_iot_get_log_level(void)
Get Log Level configured as part of SDK Initialization.
Definition: config.cpp:174
static void log_write_to_stderr(const char *logmsg, size_t logmsg_len)
Prefixes Log Message with timestamp and writes to stderr.
Definition: log.cpp:150