#pragma once typedef enum { wrdp_log_level_error, wrdp_log_level_warning, wrdp_log_level_info, wrdp_log_level_debug, wrdp_log_level_trace } wrdp_log_level_e; static const uint16_t wrdp_log_flag_binary = 0x0001; typedef struct _log_msg_info { /* message buffer: * containing message which will be displayed * * mandatory parameter */ const uint8_t *buf; /* message size: * size of message in buiffer which must be displayed * * optional in case of null terminated string, mandatory otherwise */ size_t buf_size; /* log level for this message * * optional, default is 'wrdp_log_level_error' */ wrdp_log_level_e level; /* message flags: * currently supported flags is: * 'wrdp_log_flag_binary': print message as hex data * optional, default is plain text */ uint16_t flags; /* pointers to various data structures which may be usefule * during debugging * optional */ void *task_info, *wrdp_thpool_task, *ws_session; } log_msg_info;