48#define sl_log_byte_arr(tag, lvl, _arr, _arr_len) \
50 char _tmp_log_arr[_arr_len * 2 + 1] = {0}; \
51 char *_cur_log_arr_idx = _tmp_log_arr; \
52 for (unsigned int _log_arr_count = 0; _log_arr_count < _arr_len; \
55 += snprintf(_cur_log_arr_idx, \
56 sizeof(_tmp_log_arr) - (_cur_log_arr_idx - _tmp_log_arr), \
58 (_arr)[_log_arr_count]); \
60 sl_log(tag, lvl, "%s\n", _tmp_log_arr); \
63#ifdef ZWAVE_BUILD_SYSTEM
65#include "sl_log_gecko.h"
136#define COLOR_START "\033[32;1m"
137#define COLOR_END "\033[0m"
139#define sl_log_debug(tag, fmtstr, ...) \
140 sl_log(tag, SL_LOG_DEBUG, fmtstr, ##__VA_ARGS__)
141#define sl_log_info(tag, fmtstr, ...) \
142 sl_log(tag, SL_LOG_INFO, fmtstr, ##__VA_ARGS__)
143#define sl_log_warning(tag, fmtstr, ...) \
144 sl_log(tag, SL_LOG_WARNING, fmtstr, ##__VA_ARGS__)
145#define sl_log_error(tag, fmtstr, ...) \
146 sl_log(tag, SL_LOG_ERROR, fmtstr, ##__VA_ARGS__)
147#define sl_log_critical(tag, fmtstr, ...) \
148 sl_log(tag, SL_LOG_CRITICAL, fmtstr, ##__VA_ARGS__)
sl_status_t sl_log_level_from_string(const char *level, sl_log_level_t *result)
Convert sl_log_level as string to sl_log_level_t.
sl_log_level_t sl_log_get_level()
Get log level.
void sl_log_unset_tag_level(const char *tag)
Remove tag specific log level for tag.
void sl_log_set_tag_level(const char *tag, sl_log_level_t level)
Set log level for a given tag.
void sl_log(const char *const tag, sl_log_level_t level, const char *fmtstr,...)
Write to the log.
void sl_log_read_config()
Read configuration from config library.
void sl_log_set_level(sl_log_level_t level)
Set log level.
enum sl_log_level sl_log_level_t
Log levels.
sl_log_level
Log levels.
Definition: sl_log.h:38
@ SL_LOG_ERROR
Definition: sl_log.h:42
@ SL_LOG_DEBUG
Definition: sl_log.h:39
@ SL_LOG_CRITICAL
Definition: sl_log.h:43
@ SL_LOG_WARNING
Definition: sl_log.h:41
@ SL_LOG_INFO
Definition: sl_log.h:40
uint32_t sl_status_t
Definition: sl_status.h:139