40 #define LLL_ERR (1 << 0)
41 #define LLL_WARN (1 << 1)
42 #define LLL_NOTICE (1 << 2)
43 #define LLL_INFO (1 << 3)
44 #define LLL_DEBUG (1 << 4)
45 #define LLL_PARSER (1 << 5)
46 #define LLL_HEADER (1 << 6)
47 #define LLL_EXT (1 << 7)
48 #define LLL_CLIENT (1 << 8)
49 #define LLL_LATENCY (1 << 9)
50 #define LLL_USER (1 << 10)
51 #define LLL_THREAD (1 << 11)
53 #define LLL_COUNT (12)
55 #define LLLF_SECRECY_PII (1 << 16)
57 #define LLLF_SECRECY_BEARER (1 << 17)
60 #define LLLF_LOG_TIMESTAMP (1 << 18)
63 #define LLLF_LOG_CONTEXT_AWARE (1 << 30)
69 typedef void (*lws_log_emit_t)(
int level,
const char *line);
70 typedef void (*lws_log_emit_cx_t)(
struct lws_log_cx *cx,
int level,
71 const char *line,
size_t len);
72 typedef void (*lws_log_prepend_cx_t)(
struct lws_log_cx *cx,
void *obj,
74 typedef void (*lws_log_use_cx_t)(
struct lws_log_cx *cx,
int _new);
83 lws_log_emit_cx_t emit_cx;
113 LWS_VISIBLE LWS_EXTERN
int
116 #if defined(LWS_PLAT_OPTEE) && !defined(LWS_WITH_NETWORK)
117 #define _lws_log(aaa, ...) SMSG(__VA_ARGS__)
119 LWS_VISIBLE LWS_EXTERN
void
120 _lws_log(
int filter,
const char *format, ...) LWS_FORMAT(2);
121 LWS_VISIBLE LWS_EXTERN
void
122 _lws_logv(
int filter, const
char *format, va_list vl);
129 lwsl_context_get_cx(
struct lws_context *cx);
131 lwsl_vhost_get_cx(
struct lws_vhost *vh);
133 lwsl_wsi_get_cx(
struct lws *wsi);
134 #if defined(LWS_WITH_SECURE_STREAMS)
135 struct lws_ss_handle;
136 struct lws_sspc_handle;
138 lwsl_ss_get_cx(
struct lws_ss_handle *ss);
140 lwsl_sspc_get_cx(
struct lws_sspc_handle *ss);
143 LWS_VISIBLE LWS_EXTERN
void
144 lws_log_emit_cx_file(
struct lws_log_cx *cx,
int level,
const char *line,
147 LWS_VISIBLE LWS_EXTERN
void
148 lws_log_use_cx_file(
struct lws_log_cx *cx,
int _new);
150 LWS_VISIBLE LWS_EXTERN
void
151 lws_log_prepend_context(
struct lws_log_cx *cx,
void *obj,
char **p,
char *e);
152 LWS_VISIBLE LWS_EXTERN
void
153 lws_log_prepend_vhost(
struct lws_log_cx *cx,
void *obj,
char **p,
char *e);
154 LWS_VISIBLE LWS_EXTERN
void
155 lws_log_prepend_wsi(
struct lws_log_cx *cx,
void *obj,
char **p,
char *e);
156 #if defined(LWS_WITH_SECURE_STREAMS)
157 LWS_VISIBLE LWS_EXTERN
void
158 lws_log_prepend_ss(
struct lws_log_cx *cx,
void *obj,
char **p,
char *e);
159 LWS_VISIBLE LWS_EXTERN
void
160 lws_log_prepend_sspc(
struct lws_log_cx *cx,
void *obj,
char **p,
char *e);
163 LWS_VISIBLE LWS_EXTERN
void
164 _lws_log_cx(
lws_log_cx_t *cx, lws_log_prepend_cx_t prep,
void *obj,
165 int filter,
const char *_fun,
const char *format, ...) LWS_FORMAT(6);
167 #define lwsl_cx(_c, _fil, ...) \
168 _lws_log_cx(lwsl_context_get_cx(_c), lws_log_prepend_context, \
169 _c, _fil, __func__, __VA_ARGS__)
170 #define lwsl_vhost(_v, _fil, ...) \
171 _lws_log_cx(lwsl_vhost_get_cx(_v), lws_log_prepend_vhost, _v, \
172 _fil, __func__, __VA_ARGS__)
173 #define lwsl_wsi(_w, _fil, ...) \
174 _lws_log_cx(lwsl_wsi_get_cx(_w), lws_log_prepend_wsi, _w, \
175 _fil, __func__, __VA_ARGS__)
176 #define lwsl_ss(_h, _fil, ...) \
177 _lws_log_cx(lwsl_ss_get_cx(_h), lws_log_prepend_ss, _h, \
178 _fil, __func__, __VA_ARGS__)
180 #define lwsl_hexdump_context(_c, _fil, _buf, _len) \
181 lwsl_hexdump_level_cx(lwsl_context_get_cx(_c), \
182 lws_log_prepend_context, \
183 _c, _fil, _buf, _len)
184 #define lwsl_hexdump_vhost(_v, _fil, _buf, _len) \
185 lwsl_hexdump_level_cx(lwsl_vhost_get_cx(_v), \
186 lws_log_prepend_vhost, \
187 _v, _fil, _buf, _len)
188 #define lwsl_hexdump_wsi(_w, _fil, _buf, _len) \
189 lwsl_hexdump_level_cx(lwsl_wsi_get_cx(_w), \
190 lws_log_prepend_wsi, \
191 _w, _fil, _buf, _len)
192 #define lwsl_hexdump_ss(_h, _fil, _buf, _len) \
193 lwsl_hexdump_level_cx(lwsl_ss_get_cx(_h), \
194 lws_log_prepend_ss, \
195 _h, _fil, _buf, _len)
205 #if defined(LWS_WITH_NO_LOGS)
206 #define _LWS_LINIT (LLL_ERR | LLL_USER)
208 #define _LWS_LINIT ((1 << LLL_COUNT) - 1)
211 #if defined(LWS_WITH_NO_LOGS)
212 #define _LWS_LINIT (LLL_ERR | LLL_USER)
214 #define _LWS_LINIT (LLL_ERR | LLL_USER | LLL_WARN | LLL_NOTICE)
227 #if defined(LWS_LOGGING_BITFIELD_SET)
228 #define _LWS_LBS (LWS_LOGGING_BITFIELD_SET)
233 #if defined(LWS_LOGGING_BITFIELD_CLEAR)
234 #define _LWS_LBC (LWS_LOGGING_BITFIELD_CLEAR)
242 #define _LWS_ENABLED_LOGS (((_LWS_LINIT) | (_LWS_LBS)) & ~(_LWS_LBC))
253 #if (_LWS_ENABLED_LOGS & LLL_ERR)
254 #define lwsl_err(...) _lws_log(LLL_ERR, __VA_ARGS__)
256 #define lwsl_err(...) do {} while(0)
259 #if (_LWS_ENABLED_LOGS & LLL_WARN)
260 #define lwsl_warn(...) _lws_log(LLL_WARN, __VA_ARGS__)
262 #define lwsl_warn(...) do {} while(0)
265 #if (_LWS_ENABLED_LOGS & LLL_NOTICE)
266 #define lwsl_notice(...) _lws_log(LLL_NOTICE, __VA_ARGS__)
268 #define lwsl_notice(...) do {} while(0)
271 #if (_LWS_ENABLED_LOGS & LLL_INFO)
272 #define lwsl_info(...) _lws_log(LLL_INFO, __VA_ARGS__)
274 #define lwsl_info(...) do {} while(0)
277 #if (_LWS_ENABLED_LOGS & LLL_DEBUG)
278 #define lwsl_debug(...) _lws_log(LLL_DEBUG, __VA_ARGS__)
280 #define lwsl_debug(...) do {} while(0)
283 #if (_LWS_ENABLED_LOGS & LLL_PARSER)
284 #define lwsl_parser(...) _lws_log(LLL_PARSER, __VA_ARGS__)
286 #define lwsl_parser(...) do {} while(0)
289 #if (_LWS_ENABLED_LOGS & LLL_HEADER)
290 #define lwsl_header(...) _lws_log(LLL_HEADER, __VA_ARGS__)
292 #define lwsl_header(...) do {} while(0)
295 #if (_LWS_ENABLED_LOGS & LLL_EXT)
296 #define lwsl_ext(...) _lws_log(LLL_EXT, __VA_ARGS__)
298 #define lwsl_ext(...) do {} while(0)
301 #if (_LWS_ENABLED_LOGS & LLL_CLIENT)
302 #define lwsl_client(...) _lws_log(LLL_CLIENT, __VA_ARGS__)
304 #define lwsl_client(...) do {} while(0)
307 #if (_LWS_ENABLED_LOGS & LLL_LATENCY)
308 #define lwsl_latency(...) _lws_log(LLL_LATENCY, __VA_ARGS__)
310 #define lwsl_latency(...) do {} while(0)
313 #if (_LWS_ENABLED_LOGS & LLL_THREAD)
314 #define lwsl_thread(...) _lws_log(LLL_THREAD, __VA_ARGS__)
316 #define lwsl_thread(...) do {} while(0)
319 #if (_LWS_ENABLED_LOGS & LLL_USER)
320 #define lwsl_user(...) _lws_log(LLL_USER, __VA_ARGS__)
322 #define lwsl_user(...) do {} while(0)
325 #define lwsl_hexdump_err(...) lwsl_hexdump_level(LLL_ERR, __VA_ARGS__)
326 #define lwsl_hexdump_warn(...) lwsl_hexdump_level(LLL_WARN, __VA_ARGS__)
327 #define lwsl_hexdump_notice(...) lwsl_hexdump_level(LLL_NOTICE, __VA_ARGS__)
328 #define lwsl_hexdump_info(...) lwsl_hexdump_level(LLL_INFO, __VA_ARGS__)
329 #define lwsl_hexdump_debug(...) lwsl_hexdump_level(LLL_DEBUG, __VA_ARGS__)
335 #if (_LWS_ENABLED_LOGS & LLL_ERR)
336 #define lwsl_cx_err(_c, ...) lwsl_cx(_c, LLL_ERR, __VA_ARGS__)
338 #define lwsl_cx_err(_c, ...) do {} while(0)
341 #if (_LWS_ENABLED_LOGS & LLL_WARN)
342 #define lwsl_cx_warn(_c, ...) lwsl_cx(_c, LLL_WARN, __VA_ARGS__)
344 #define lwsl_cx_warn(_c, ...) do {} while(0)
347 #if (_LWS_ENABLED_LOGS & LLL_NOTICE)
348 #define lwsl_cx_notice(_c, ...) lwsl_cx(_c, LLL_NOTICE, __VA_ARGS__)
350 #define lwsl_cx_notice(_c, ...) do {} while(0)
353 #if (_LWS_ENABLED_LOGS & LLL_INFO)
354 #define lwsl_cx_info(_c, ...) lwsl_cx(_c, LLL_INFO, __VA_ARGS__)
356 #define lwsl_cx_info(_c, ...) do {} while(0)
359 #if (_LWS_ENABLED_LOGS & LLL_DEBUG)
360 #define lwsl_cx_debug(_c, ...) lwsl_cx(_c, LLL_DEBUG, __VA_ARGS__)
362 #define lwsl_cx_debug(_c, ...) do {} while(0)
365 #if (_LWS_ENABLED_LOGS & LLL_PARSER)
366 #define lwsl_cx_parser(_c, ...) lwsl_cx(_c, LLL_PARSER, __VA_ARGS__)
368 #define lwsl_cx_parser(_c, ...) do {} while(0)
371 #if (_LWS_ENABLED_LOGS & LLL_HEADER)
372 #define lwsl_cx_header(_c, ...) lwsl_cx(_c, LLL_HEADER, __VA_ARGS__)
374 #define lwsl_cx_header(_c, ...) do {} while(0)
377 #if (_LWS_ENABLED_LOGS & LLL_EXT)
378 #define lwsl_cx_ext(_c, ...) lwsl_cx(_c, LLL_EXT, __VA_ARGS__)
380 #define lwsl_cx_ext(_c, ...) do {} while(0)
383 #if (_LWS_ENABLED_LOGS & LLL_CLIENT)
384 #define lwsl_cx_client(_c, ...) lwsl_cx(_c, LLL_CLIENT, __VA_ARGS__)
386 #define lwsl_cx_client(_c, ...) do {} while(0)
389 #if (_LWS_ENABLED_LOGS & LLL_LATENCY)
390 #define lwsl_cx_latency(_c, ...) lwsl_cx(_c, LLL_LATENCY, __VA_ARGS__)
392 #define lwsl_cx_latency(_c, ...) do {} while(0)
395 #if (_LWS_ENABLED_LOGS & LLL_THREAD)
396 #define lwsl_cx_thread(_c, ...) lwsl_cx(_c, LLL_THREAD, __VA_ARGS__)
398 #define lwsl_cx_thread(_c, ...) do {} while(0)
401 #if (_LWS_ENABLED_LOGS & LLL_USER)
402 #define lwsl_cx_user(_c, ...) lwsl_cx(_c, LLL_USER, __VA_ARGS__)
404 #define lwsl_cx_user(_c, ...) do {} while(0)
407 #define lwsl_hexdump_cx_err(_c, ...) lwsl_hexdump_context(_c, LLL_ERR, __VA_ARGS__)
408 #define lwsl_hexdump_cx_warn(_c, ...) lwsl_hexdump_context(_c, LLL_WARN, __VA_ARGS__)
409 #define lwsl_hexdump_cx_notice(_c, ...) lwsl_hexdump_context(_c, LLL_NOTICE, __VA_ARGS__)
410 #define lwsl_hexdump_cx_info(_c, ...) lwsl_hexdump_context(_c, LLL_INFO, __VA_ARGS__)
411 #define lwsl_hexdump_cx_debug(_c, ...) lwsl_hexdump_context(_c, LLL_DEBUG, __VA_ARGS__)
417 #if (_LWS_ENABLED_LOGS & LLL_ERR)
418 #define lwsl_vhost_err(_v, ...) lwsl_vhost(_v, LLL_ERR, __VA_ARGS__)
420 #define lwsl_vhost_err(_v, ...) do {} while(0)
423 #if (_LWS_ENABLED_LOGS & LLL_WARN)
424 #define lwsl_vhost_warn(_v, ...) lwsl_vhost(_v, LLL_WARN, __VA_ARGS__)
426 #define lwsl_vhost_warn(_v, ...) do {} while(0)
429 #if (_LWS_ENABLED_LOGS & LLL_NOTICE)
430 #define lwsl_vhost_notice(_v, ...) lwsl_vhost(_v, LLL_NOTICE, __VA_ARGS__)
432 #define lwsl_vhost_notice(_v, ...) do {} while(0)
435 #if (_LWS_ENABLED_LOGS & LLL_INFO)
436 #define lwsl_vhost_info(_v, ...) lwsl_vhost(_v, LLL_INFO, __VA_ARGS__)
438 #define lwsl_vhost_info(_v, ...) do {} while(0)
441 #if (_LWS_ENABLED_LOGS & LLL_DEBUG)
442 #define lwsl_vhost_debug(_v, ...) lwsl_vhost(_v, LLL_DEBUG, __VA_ARGS__)
444 #define lwsl_vhost_debug(_v, ...) do {} while(0)
447 #if (_LWS_ENABLED_LOGS & LLL_PARSER)
448 #define lwsl_vhost_parser(_v, ...) lwsl_vhost(_v, LLL_PARSER, __VA_ARGS__)
450 #define lwsl_vhost_parser(_v, ...) do {} while(0)
453 #if (_LWS_ENABLED_LOGS & LLL_HEADER)
454 #define lwsl_vhost_header(_v, ...) lwsl_vhost(_v, LLL_HEADER, __VA_ARGS__)
456 #define lwsl_vhost_header(_v, ...) do {} while(0)
459 #if (_LWS_ENABLED_LOGS & LLL_EXT)
460 #define lwsl_vhost_ext(_v, ...) lwsl_vhost(_v, LLL_EXT, __VA_ARGS__)
462 #define lwsl_vhost_ext(_v, ...) do {} while(0)
465 #if (_LWS_ENABLED_LOGS & LLL_CLIENT)
466 #define lwsl_vhost_client(_v, ...) lwsl_vhost(_v, LLL_CLIENT, __VA_ARGS__)
468 #define lwsl_vhost_client(_v, ...) do {} while(0)
471 #if (_LWS_ENABLED_LOGS & LLL_LATENCY)
472 #define lwsl_vhost_latency(_v, ...) lwsl_vhost(_v, LLL_LATENCY, __VA_ARGS__)
474 #define lwsl_vhost_latency(_v, ...) do {} while(0)
477 #if (_LWS_ENABLED_LOGS & LLL_THREAD)
478 #define lwsl_vhost_thread(_v, ...) lwsl_vhost(_v, LLL_THREAD, __VA_ARGS__)
480 #define lwsl_vhost_thread(_v, ...) do {} while(0)
483 #if (_LWS_ENABLED_LOGS & LLL_USER)
484 #define lwsl_vhost_user(_v, ...) lwsl_vhost(_v, LLL_USER, __VA_ARGS__)
486 #define lwsl_vhost_user(_v, ...) do {} while(0)
489 #define lwsl_hexdump_vhost_err(_v, ...) lwsl_hexdump_vhost(_v, LLL_ERR, __VA_ARGS__)
490 #define lwsl_hexdump_vhost_warn(_v, ...) lwsl_hexdump_vhost(_v, LLL_WARN, __VA_ARGS__)
491 #define lwsl_hexdump_vhost_notice(_v, ...) lwsl_hexdump_vhost(_v, LLL_NOTICE, __VA_ARGS__)
492 #define lwsl_hexdump_vhost_info(_v, ...) lwsl_hexdump_vhost(_v, LLL_INFO, __VA_ARGS__)
493 #define lwsl_hexdump_vhost_debug(_v, ...) lwsl_hexdump_vhost(_v, LLL_DEBUG, __VA_ARGS__)
500 #if (_LWS_ENABLED_LOGS & LLL_ERR)
501 #define lwsl_wsi_err(_w, ...) lwsl_wsi(_w, LLL_ERR, __VA_ARGS__)
503 #define lwsl_wsi_err(_w, ...) do {} while(0)
506 #if (_LWS_ENABLED_LOGS & LLL_WARN)
507 #define lwsl_wsi_warn(_w, ...) lwsl_wsi(_w, LLL_WARN, __VA_ARGS__)
509 #define lwsl_wsi_warn(_w, ...) do {} while(0)
512 #if (_LWS_ENABLED_LOGS & LLL_NOTICE)
513 #define lwsl_wsi_notice(_w, ...) lwsl_wsi(_w, LLL_NOTICE, __VA_ARGS__)
515 #define lwsl_wsi_notice(_w, ...) do {} while(0)
518 #if (_LWS_ENABLED_LOGS & LLL_INFO)
519 #define lwsl_wsi_info(_w, ...) lwsl_wsi(_w, LLL_INFO, __VA_ARGS__)
521 #define lwsl_wsi_info(_w, ...) do {} while(0)
524 #if (_LWS_ENABLED_LOGS & LLL_DEBUG)
525 #define lwsl_wsi_debug(_w, ...) lwsl_wsi(_w, LLL_DEBUG, __VA_ARGS__)
527 #define lwsl_wsi_debug(_w, ...) do {} while(0)
530 #if (_LWS_ENABLED_LOGS & LLL_PARSER)
531 #define lwsl_wsi_parser(_w, ...) lwsl_wsi(_w, LLL_PARSER, __VA_ARGS__)
533 #define lwsl_wsi_parser(_w, ...) do {} while(0)
536 #if (_LWS_ENABLED_LOGS & LLL_HEADER)
537 #define lwsl_wsi_header(_w, ...) lwsl_wsi(_w, LLL_HEADER, __VA_ARGS__)
539 #define lwsl_wsi_header(_w, ...) do {} while(0)
542 #if (_LWS_ENABLED_LOGS & LLL_EXT)
543 #define lwsl_wsi_ext(_w, ...) lwsl_wsi(_w, LLL_EXT, __VA_ARGS__)
545 #define lwsl_wsi_ext(_w, ...) do {} while(0)
548 #if (_LWS_ENABLED_LOGS & LLL_CLIENT)
549 #define lwsl_wsi_client(_w, ...) lwsl_wsi(_w, LLL_CLIENT, __VA_ARGS__)
551 #define lwsl_wsi_client(_w, ...) do {} while(0)
554 #if (_LWS_ENABLED_LOGS & LLL_LATENCY)
555 #define lwsl_wsi_latency(_w, ...) lwsl_wsi(_w, LLL_LATENCY, __VA_ARGS__)
557 #define lwsl_wsi_latency(_w, ...) do {} while(0)
560 #if (_LWS_ENABLED_LOGS & LLL_THREAD)
561 #define lwsl_wsi_thread(_w, ...) lwsl_wsi(_w, LLL_THREAD, __VA_ARGS__)
563 #define lwsl_wsi_thread(_w, ...) do {} while(0)
566 #if (_LWS_ENABLED_LOGS & LLL_USER)
567 #define lwsl_wsi_user(_w, ...) lwsl_wsi(_w, LLL_USER, __VA_ARGS__)
569 #define lwsl_wsi_user(_w, ...) do {} while(0)
572 #define lwsl_hexdump_wsi_err(_v, ...) lwsl_hexdump_wsi(_v, LLL_ERR, __VA_ARGS__)
573 #define lwsl_hexdump_wsi_warn(_v, ...) lwsl_hexdump_wsi(_v, LLL_WARN, __VA_ARGS__)
574 #define lwsl_hexdump_wsi_notice(_v, ...) lwsl_hexdump_wsi(_v, LLL_NOTICE, __VA_ARGS__)
575 #define lwsl_hexdump_wsi_info(_v, ...) lwsl_hexdump_wsi(_v, LLL_INFO, __VA_ARGS__)
576 #define lwsl_hexdump_wsi_debug(_v, ...) lwsl_hexdump_wsi(_v, LLL_DEBUG, __VA_ARGS__)
583 #if (_LWS_ENABLED_LOGS & LLL_ERR)
584 #define lwsl_ss_err(_w, ...) lwsl_ss(_w, LLL_ERR, __VA_ARGS__)
586 #define lwsl_ss_err(_w, ...) do {} while(0)
589 #if (_LWS_ENABLED_LOGS & LLL_WARN)
590 #define lwsl_ss_warn(_w, ...) lwsl_ss(_w, LLL_WARN, __VA_ARGS__)
592 #define lwsl_ss_warn(_w, ...) do {} while(0)
595 #if (_LWS_ENABLED_LOGS & LLL_NOTICE)
596 #define lwsl_ss_notice(_w, ...) lwsl_ss(_w, LLL_NOTICE, __VA_ARGS__)
598 #define lwsl_ss_notice(_w, ...) do {} while(0)
601 #if (_LWS_ENABLED_LOGS & LLL_INFO)
602 #define lwsl_ss_info(_w, ...) lwsl_ss(_w, LLL_INFO, __VA_ARGS__)
604 #define lwsl_ss_info(_w, ...) do {} while(0)
607 #if (_LWS_ENABLED_LOGS & LLL_DEBUG)
608 #define lwsl_ss_debug(_w, ...) lwsl_ss(_w, LLL_DEBUG, __VA_ARGS__)
610 #define lwsl_ss_debug(_w, ...) do {} while(0)
613 #if (_LWS_ENABLED_LOGS & LLL_PARSER)
614 #define lwsl_ss_parser(_w, ...) lwsl_ss(_w, LLL_PARSER, __VA_ARGS__)
616 #define lwsl_ss_parser(_w, ...) do {} while(0)
619 #if (_LWS_ENABLED_LOGS & LLL_HEADER)
620 #define lwsl_ss_header(_w, ...) lwsl_ss(_w, LLL_HEADER, __VA_ARGS__)
622 #define lwsl_ss_header(_w, ...) do {} while(0)
625 #if (_LWS_ENABLED_LOGS & LLL_EXT)
626 #define lwsl_ss_ext(_w, ...) lwsl_ss(_w, LLL_EXT, __VA_ARGS__)
628 #define lwsl_ss_ext(_w, ...) do {} while(0)
631 #if (_LWS_ENABLED_LOGS & LLL_CLIENT)
632 #define lwsl_ss_client(_w, ...) lwsl_ss(_w, LLL_CLIENT, __VA_ARGS__)
634 #define lwsl_ss_client(_w, ...) do {} while(0)
637 #if (_LWS_ENABLED_LOGS & LLL_LATENCY)
638 #define lwsl_ss_latency(_w, ...) lwsl_ss(_w, LLL_LATENCY, __VA_ARGS__)
640 #define lwsl_ss_latency(_w, ...) do {} while(0)
643 #if (_LWS_ENABLED_LOGS & LLL_THREAD)
644 #define lwsl_ss_thread(_w, ...) lwsl_ss(_w, LLL_THREAD, __VA_ARGS__)
646 #define lwsl_ss_thread(_w, ...) do {} while(0)
649 #if (_LWS_ENABLED_LOGS & LLL_USER)
650 #define lwsl_ss_user(_w, ...) lwsl_ss(_w, LLL_USER, __VA_ARGS__)
652 #define lwsl_ss_user(_w, ...) do {} while(0)
655 #define lwsl_hexdump_ss_err(_v, ...) lwsl_hexdump_ss(_v, LLL_ERR, __VA_ARGS__)
656 #define lwsl_hexdump_ss_warn(_v, ...) lwsl_hexdump_ss(_v, LLL_WARN, __VA_ARGS__)
657 #define lwsl_hexdump_ss_notice(_v, ...) lwsl_hexdump_ss(_v, LLL_NOTICE, __VA_ARGS__)
658 #define lwsl_hexdump_ss_info(_v, ...) lwsl_hexdump_ss(_v, LLL_INFO, __VA_ARGS__)
659 #define lwsl_hexdump_ss_debug(_v, ...) lwsl_hexdump_ss(_v, LLL_DEBUG, __VA_ARGS__)
673 LWS_VISIBLE LWS_EXTERN
void
676 LWS_VISIBLE LWS_EXTERN
void
677 lwsl_hexdump_level_cx(
lws_log_cx_t *cx, lws_log_prepend_cx_t prep,
void *obj,
678 int hexdump_level,
const void *vbuf,
size_t len);
690 LWS_VISIBLE LWS_EXTERN
void
696 static LWS_INLINE
int lws_is_be(
void) {
697 const int probe = ~0xff;
699 return *(
const char *)&probe;
721 LWS_VISIBLE LWS_EXTERN
void
733 LWS_VISIBLE LWS_EXTERN
void
749 LWS_VISIBLE LWS_EXTERN
void
763 LWS_VISIBLE LWS_EXTERN
void
775 LWS_VISIBLE LWS_EXTERN
int
780 LWS_VISIBLE LWS_EXTERN
const char *
781 lws_wsi_tag(
struct lws *wsi);
783 LWS_VISIBLE LWS_EXTERN
void
LWS_VISIBLE LWS_EXTERN void lwsl_hexdump_level(int level, const void *vbuf, size_t len)
LWS_VISIBLE LWS_EXTERN int lwsl_visible(int level)
LWS_VISIBLE LWS_EXTERN void lws_set_log_level(int level, lws_log_emit_t log_emit_function)
LWS_VISIBLE LWS_EXTERN int lwsl_timestamp(int level, char *p, size_t len)
LWS_VISIBLE LWS_EXTERN void lwsl_emit_stderr_notimestamp(int level, const char *line)
LWS_VISIBLE LWS_EXTERN void lwsl_hexdump(const void *buf, size_t len)
LWS_VISIBLE LWS_EXTERN void lwsl_emit_stderr(int level, const char *line)
LWS_VISIBLE LWS_EXTERN void lwsl_emit_syslog(int level, const char *line)
Definition: lws-logs.h:80
uint32_t lll_flags
Definition: lws-logs.h:98
int32_t refcount
Definition: lws-logs.h:100
lws_log_prepend_cx_t prepend
Definition: lws-logs.h:89
void * stg
Definition: lws-logs.h:96
void * opaque
Definition: lws-logs.h:94
lws_log_use_cx_t refcount_cb
Definition: lws-logs.h:85
struct lws_log_cx * parent
Definition: lws-logs.h:92