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;
87 pthread_mutex_t refcount_lock;
121 LWS_VISIBLE LWS_EXTERN
int
124 #if defined(LWS_PLAT_OPTEE) && !defined(LWS_WITH_NETWORK)
125 #define _lws_log(aaa, ...) SMSG(__VA_ARGS__)
127 LWS_VISIBLE LWS_EXTERN
void
128 _lws_log(
int filter,
const char *format, ...) LWS_FORMAT(2);
129 LWS_VISIBLE LWS_EXTERN
void
130 _lws_logv(
int filter, const
char *format, va_list vl);
137 lwsl_context_get_cx(
struct lws_context *cx);
139 lwsl_vhost_get_cx(
struct lws_vhost *vh);
141 lwsl_wsi_get_cx(
struct lws *wsi);
142 #if defined(LWS_WITH_SECURE_STREAMS)
143 struct lws_ss_handle;
144 struct lws_sspc_handle;
146 lwsl_ss_get_cx(
struct lws_ss_handle *ss);
148 lwsl_sspc_get_cx(
struct lws_sspc_handle *ss);
151 LWS_VISIBLE LWS_EXTERN
void
152 lws_log_emit_cx_file(
struct lws_log_cx *cx,
int level,
const char *line,
155 LWS_VISIBLE LWS_EXTERN
void
156 lws_log_use_cx_file(
struct lws_log_cx *cx,
int _new);
158 LWS_VISIBLE LWS_EXTERN
void
159 lws_log_prepend_context(
struct lws_log_cx *cx,
void *obj,
char **p,
char *e);
160 LWS_VISIBLE LWS_EXTERN
void
161 lws_log_prepend_vhost(
struct lws_log_cx *cx,
void *obj,
char **p,
char *e);
162 LWS_VISIBLE LWS_EXTERN
void
163 lws_log_prepend_wsi(
struct lws_log_cx *cx,
void *obj,
char **p,
char *e);
164 #if defined(LWS_WITH_SECURE_STREAMS)
165 LWS_VISIBLE LWS_EXTERN
void
166 lws_log_prepend_ss(
struct lws_log_cx *cx,
void *obj,
char **p,
char *e);
167 LWS_VISIBLE LWS_EXTERN
void
168 lws_log_prepend_sspc(
struct lws_log_cx *cx,
void *obj,
char **p,
char *e);
171 LWS_VISIBLE LWS_EXTERN
void
172 _lws_log_cx(
lws_log_cx_t *cx, lws_log_prepend_cx_t prep,
void *obj,
173 int filter,
const char *_fun,
const char *format, ...) LWS_FORMAT(6);
175 #define lwsl_cx(_c, _fil, ...) \
176 _lws_log_cx(lwsl_context_get_cx(_c), lws_log_prepend_context, \
177 _c, _fil, __func__, __VA_ARGS__)
178 #define lwsl_vhost(_v, _fil, ...) \
179 _lws_log_cx(lwsl_vhost_get_cx(_v), lws_log_prepend_vhost, _v, \
180 _fil, __func__, __VA_ARGS__)
181 #define lwsl_wsi(_w, _fil, ...) \
182 _lws_log_cx(lwsl_wsi_get_cx(_w), lws_log_prepend_wsi, _w, \
183 _fil, __func__, __VA_ARGS__)
184 #define lwsl_ss(_h, _fil, ...) \
185 _lws_log_cx(lwsl_ss_get_cx(_h), lws_log_prepend_ss, _h, \
186 _fil, __func__, __VA_ARGS__)
188 #define lwsl_hexdump_context(_c, _fil, _buf, _len) \
189 lwsl_hexdump_level_cx(lwsl_context_get_cx(_c), \
190 lws_log_prepend_context, \
191 _c, _fil, _buf, _len)
192 #define lwsl_hexdump_vhost(_v, _fil, _buf, _len) \
193 lwsl_hexdump_level_cx(lwsl_vhost_get_cx(_v), \
194 lws_log_prepend_vhost, \
195 _v, _fil, _buf, _len)
196 #define lwsl_hexdump_wsi(_w, _fil, _buf, _len) \
197 lwsl_hexdump_level_cx(lwsl_wsi_get_cx(_w), \
198 lws_log_prepend_wsi, \
199 _w, _fil, _buf, _len)
200 #define lwsl_hexdump_ss(_h, _fil, _buf, _len) \
201 lwsl_hexdump_level_cx(lwsl_ss_get_cx(_h), \
202 lws_log_prepend_ss, \
203 _h, _fil, _buf, _len)
213 #if defined(LWS_WITH_NO_LOGS)
214 #define _LWS_LINIT (LLL_ERR | LLL_USER)
216 #define _LWS_LINIT ((1 << LLL_COUNT) - 1)
219 #if defined(LWS_WITH_NO_LOGS)
220 #define _LWS_LINIT (LLL_ERR | LLL_USER)
222 #define _LWS_LINIT (LLL_ERR | LLL_USER | LLL_WARN | LLL_NOTICE)
235 #if defined(LWS_LOGGING_BITFIELD_SET)
236 #define _LWS_LBS (LWS_LOGGING_BITFIELD_SET)
241 #if defined(LWS_LOGGING_BITFIELD_CLEAR)
242 #define _LWS_LBC (LWS_LOGGING_BITFIELD_CLEAR)
250 #define _LWS_ENABLED_LOGS (((_LWS_LINIT) | (_LWS_LBS)) & ~(_LWS_LBC))
261 #if (_LWS_ENABLED_LOGS & LLL_ERR)
262 #define lwsl_err(...) _lws_log(LLL_ERR, __VA_ARGS__)
264 #define lwsl_err(...) do {} while(0)
267 #if (_LWS_ENABLED_LOGS & LLL_WARN)
268 #define lwsl_warn(...) _lws_log(LLL_WARN, __VA_ARGS__)
270 #define lwsl_warn(...) do {} while(0)
273 #if (_LWS_ENABLED_LOGS & LLL_NOTICE)
274 #define lwsl_notice(...) _lws_log(LLL_NOTICE, __VA_ARGS__)
276 #define lwsl_notice(...) do {} while(0)
279 #if (_LWS_ENABLED_LOGS & LLL_INFO)
280 #define lwsl_info(...) _lws_log(LLL_INFO, __VA_ARGS__)
282 #define lwsl_info(...) do {} while(0)
285 #if (_LWS_ENABLED_LOGS & LLL_DEBUG)
286 #define lwsl_debug(...) _lws_log(LLL_DEBUG, __VA_ARGS__)
288 #define lwsl_debug(...) do {} while(0)
291 #if (_LWS_ENABLED_LOGS & LLL_PARSER)
292 #define lwsl_parser(...) _lws_log(LLL_PARSER, __VA_ARGS__)
294 #define lwsl_parser(...) do {} while(0)
297 #if (_LWS_ENABLED_LOGS & LLL_HEADER)
298 #define lwsl_header(...) _lws_log(LLL_HEADER, __VA_ARGS__)
300 #define lwsl_header(...) do {} while(0)
303 #if (_LWS_ENABLED_LOGS & LLL_EXT)
304 #define lwsl_ext(...) _lws_log(LLL_EXT, __VA_ARGS__)
306 #define lwsl_ext(...) do {} while(0)
309 #if (_LWS_ENABLED_LOGS & LLL_CLIENT)
310 #define lwsl_client(...) _lws_log(LLL_CLIENT, __VA_ARGS__)
312 #define lwsl_client(...) do {} while(0)
315 #if (_LWS_ENABLED_LOGS & LLL_LATENCY)
316 #define lwsl_latency(...) _lws_log(LLL_LATENCY, __VA_ARGS__)
318 #define lwsl_latency(...) do {} while(0)
321 #if (_LWS_ENABLED_LOGS & LLL_THREAD)
322 #define lwsl_thread(...) _lws_log(LLL_THREAD, __VA_ARGS__)
324 #define lwsl_thread(...) do {} while(0)
327 #if (_LWS_ENABLED_LOGS & LLL_USER)
328 #define lwsl_user(...) _lws_log(LLL_USER, __VA_ARGS__)
330 #define lwsl_user(...) do {} while(0)
333 #define lwsl_hexdump_err(...) lwsl_hexdump_level(LLL_ERR, __VA_ARGS__)
334 #define lwsl_hexdump_warn(...) lwsl_hexdump_level(LLL_WARN, __VA_ARGS__)
335 #define lwsl_hexdump_notice(...) lwsl_hexdump_level(LLL_NOTICE, __VA_ARGS__)
336 #define lwsl_hexdump_info(...) lwsl_hexdump_level(LLL_INFO, __VA_ARGS__)
337 #define lwsl_hexdump_debug(...) lwsl_hexdump_level(LLL_DEBUG, __VA_ARGS__)
343 #if (_LWS_ENABLED_LOGS & LLL_ERR)
344 #define lwsl_cx_err(_c, ...) lwsl_cx(_c, LLL_ERR, __VA_ARGS__)
346 #define lwsl_cx_err(_c, ...) do {} while(0)
349 #if (_LWS_ENABLED_LOGS & LLL_WARN)
350 #define lwsl_cx_warn(_c, ...) lwsl_cx(_c, LLL_WARN, __VA_ARGS__)
352 #define lwsl_cx_warn(_c, ...) do {} while(0)
355 #if (_LWS_ENABLED_LOGS & LLL_NOTICE)
356 #define lwsl_cx_notice(_c, ...) lwsl_cx(_c, LLL_NOTICE, __VA_ARGS__)
358 #define lwsl_cx_notice(_c, ...) do {} while(0)
361 #if (_LWS_ENABLED_LOGS & LLL_INFO)
362 #define lwsl_cx_info(_c, ...) lwsl_cx(_c, LLL_INFO, __VA_ARGS__)
364 #define lwsl_cx_info(_c, ...) do {} while(0)
367 #if (_LWS_ENABLED_LOGS & LLL_DEBUG)
368 #define lwsl_cx_debug(_c, ...) lwsl_cx(_c, LLL_DEBUG, __VA_ARGS__)
370 #define lwsl_cx_debug(_c, ...) do {} while(0)
373 #if (_LWS_ENABLED_LOGS & LLL_PARSER)
374 #define lwsl_cx_parser(_c, ...) lwsl_cx(_c, LLL_PARSER, __VA_ARGS__)
376 #define lwsl_cx_parser(_c, ...) do {} while(0)
379 #if (_LWS_ENABLED_LOGS & LLL_HEADER)
380 #define lwsl_cx_header(_c, ...) lwsl_cx(_c, LLL_HEADER, __VA_ARGS__)
382 #define lwsl_cx_header(_c, ...) do {} while(0)
385 #if (_LWS_ENABLED_LOGS & LLL_EXT)
386 #define lwsl_cx_ext(_c, ...) lwsl_cx(_c, LLL_EXT, __VA_ARGS__)
388 #define lwsl_cx_ext(_c, ...) do {} while(0)
391 #if (_LWS_ENABLED_LOGS & LLL_CLIENT)
392 #define lwsl_cx_client(_c, ...) lwsl_cx(_c, LLL_CLIENT, __VA_ARGS__)
394 #define lwsl_cx_client(_c, ...) do {} while(0)
397 #if (_LWS_ENABLED_LOGS & LLL_LATENCY)
398 #define lwsl_cx_latency(_c, ...) lwsl_cx(_c, LLL_LATENCY, __VA_ARGS__)
400 #define lwsl_cx_latency(_c, ...) do {} while(0)
403 #if (_LWS_ENABLED_LOGS & LLL_THREAD)
404 #define lwsl_cx_thread(_c, ...) lwsl_cx(_c, LLL_THREAD, __VA_ARGS__)
406 #define lwsl_cx_thread(_c, ...) do {} while(0)
409 #if (_LWS_ENABLED_LOGS & LLL_USER)
410 #define lwsl_cx_user(_c, ...) lwsl_cx(_c, LLL_USER, __VA_ARGS__)
412 #define lwsl_cx_user(_c, ...) do {} while(0)
415 #define lwsl_hexdump_cx_err(_c, ...) lwsl_hexdump_context(_c, LLL_ERR, __VA_ARGS__)
416 #define lwsl_hexdump_cx_warn(_c, ...) lwsl_hexdump_context(_c, LLL_WARN, __VA_ARGS__)
417 #define lwsl_hexdump_cx_notice(_c, ...) lwsl_hexdump_context(_c, LLL_NOTICE, __VA_ARGS__)
418 #define lwsl_hexdump_cx_info(_c, ...) lwsl_hexdump_context(_c, LLL_INFO, __VA_ARGS__)
419 #define lwsl_hexdump_cx_debug(_c, ...) lwsl_hexdump_context(_c, LLL_DEBUG, __VA_ARGS__)
425 #if (_LWS_ENABLED_LOGS & LLL_ERR)
426 #define lwsl_vhost_err(_v, ...) lwsl_vhost(_v, LLL_ERR, __VA_ARGS__)
428 #define lwsl_vhost_err(_v, ...) do {} while(0)
431 #if (_LWS_ENABLED_LOGS & LLL_WARN)
432 #define lwsl_vhost_warn(_v, ...) lwsl_vhost(_v, LLL_WARN, __VA_ARGS__)
434 #define lwsl_vhost_warn(_v, ...) do {} while(0)
437 #if (_LWS_ENABLED_LOGS & LLL_NOTICE)
438 #define lwsl_vhost_notice(_v, ...) lwsl_vhost(_v, LLL_NOTICE, __VA_ARGS__)
440 #define lwsl_vhost_notice(_v, ...) do {} while(0)
443 #if (_LWS_ENABLED_LOGS & LLL_INFO)
444 #define lwsl_vhost_info(_v, ...) lwsl_vhost(_v, LLL_INFO, __VA_ARGS__)
446 #define lwsl_vhost_info(_v, ...) do {} while(0)
449 #if (_LWS_ENABLED_LOGS & LLL_DEBUG)
450 #define lwsl_vhost_debug(_v, ...) lwsl_vhost(_v, LLL_DEBUG, __VA_ARGS__)
452 #define lwsl_vhost_debug(_v, ...) do {} while(0)
455 #if (_LWS_ENABLED_LOGS & LLL_PARSER)
456 #define lwsl_vhost_parser(_v, ...) lwsl_vhost(_v, LLL_PARSER, __VA_ARGS__)
458 #define lwsl_vhost_parser(_v, ...) do {} while(0)
461 #if (_LWS_ENABLED_LOGS & LLL_HEADER)
462 #define lwsl_vhost_header(_v, ...) lwsl_vhost(_v, LLL_HEADER, __VA_ARGS__)
464 #define lwsl_vhost_header(_v, ...) do {} while(0)
467 #if (_LWS_ENABLED_LOGS & LLL_EXT)
468 #define lwsl_vhost_ext(_v, ...) lwsl_vhost(_v, LLL_EXT, __VA_ARGS__)
470 #define lwsl_vhost_ext(_v, ...) do {} while(0)
473 #if (_LWS_ENABLED_LOGS & LLL_CLIENT)
474 #define lwsl_vhost_client(_v, ...) lwsl_vhost(_v, LLL_CLIENT, __VA_ARGS__)
476 #define lwsl_vhost_client(_v, ...) do {} while(0)
479 #if (_LWS_ENABLED_LOGS & LLL_LATENCY)
480 #define lwsl_vhost_latency(_v, ...) lwsl_vhost(_v, LLL_LATENCY, __VA_ARGS__)
482 #define lwsl_vhost_latency(_v, ...) do {} while(0)
485 #if (_LWS_ENABLED_LOGS & LLL_THREAD)
486 #define lwsl_vhost_thread(_v, ...) lwsl_vhost(_v, LLL_THREAD, __VA_ARGS__)
488 #define lwsl_vhost_thread(_v, ...) do {} while(0)
491 #if (_LWS_ENABLED_LOGS & LLL_USER)
492 #define lwsl_vhost_user(_v, ...) lwsl_vhost(_v, LLL_USER, __VA_ARGS__)
494 #define lwsl_vhost_user(_v, ...) do {} while(0)
497 #define lwsl_hexdump_vhost_err(_v, ...) lwsl_hexdump_vhost(_v, LLL_ERR, __VA_ARGS__)
498 #define lwsl_hexdump_vhost_warn(_v, ...) lwsl_hexdump_vhost(_v, LLL_WARN, __VA_ARGS__)
499 #define lwsl_hexdump_vhost_notice(_v, ...) lwsl_hexdump_vhost(_v, LLL_NOTICE, __VA_ARGS__)
500 #define lwsl_hexdump_vhost_info(_v, ...) lwsl_hexdump_vhost(_v, LLL_INFO, __VA_ARGS__)
501 #define lwsl_hexdump_vhost_debug(_v, ...) lwsl_hexdump_vhost(_v, LLL_DEBUG, __VA_ARGS__)
508 #if (_LWS_ENABLED_LOGS & LLL_ERR)
509 #define lwsl_wsi_err(_w, ...) lwsl_wsi(_w, LLL_ERR, __VA_ARGS__)
511 #define lwsl_wsi_err(_w, ...) do {} while(0)
514 #if (_LWS_ENABLED_LOGS & LLL_WARN)
515 #define lwsl_wsi_warn(_w, ...) lwsl_wsi(_w, LLL_WARN, __VA_ARGS__)
517 #define lwsl_wsi_warn(_w, ...) do {} while(0)
520 #if (_LWS_ENABLED_LOGS & LLL_NOTICE)
521 #define lwsl_wsi_notice(_w, ...) lwsl_wsi(_w, LLL_NOTICE, __VA_ARGS__)
523 #define lwsl_wsi_notice(_w, ...) do {} while(0)
526 #if (_LWS_ENABLED_LOGS & LLL_INFO)
527 #define lwsl_wsi_info(_w, ...) lwsl_wsi(_w, LLL_INFO, __VA_ARGS__)
529 #define lwsl_wsi_info(_w, ...) do {} while(0)
532 #if (_LWS_ENABLED_LOGS & LLL_DEBUG)
533 #define lwsl_wsi_debug(_w, ...) lwsl_wsi(_w, LLL_DEBUG, __VA_ARGS__)
535 #define lwsl_wsi_debug(_w, ...) do {} while(0)
538 #if (_LWS_ENABLED_LOGS & LLL_PARSER)
539 #define lwsl_wsi_parser(_w, ...) lwsl_wsi(_w, LLL_PARSER, __VA_ARGS__)
541 #define lwsl_wsi_parser(_w, ...) do {} while(0)
544 #if (_LWS_ENABLED_LOGS & LLL_HEADER)
545 #define lwsl_wsi_header(_w, ...) lwsl_wsi(_w, LLL_HEADER, __VA_ARGS__)
547 #define lwsl_wsi_header(_w, ...) do {} while(0)
550 #if (_LWS_ENABLED_LOGS & LLL_EXT)
551 #define lwsl_wsi_ext(_w, ...) lwsl_wsi(_w, LLL_EXT, __VA_ARGS__)
553 #define lwsl_wsi_ext(_w, ...) do {} while(0)
556 #if (_LWS_ENABLED_LOGS & LLL_CLIENT)
557 #define lwsl_wsi_client(_w, ...) lwsl_wsi(_w, LLL_CLIENT, __VA_ARGS__)
559 #define lwsl_wsi_client(_w, ...) do {} while(0)
562 #if (_LWS_ENABLED_LOGS & LLL_LATENCY)
563 #define lwsl_wsi_latency(_w, ...) lwsl_wsi(_w, LLL_LATENCY, __VA_ARGS__)
565 #define lwsl_wsi_latency(_w, ...) do {} while(0)
568 #if (_LWS_ENABLED_LOGS & LLL_THREAD)
569 #define lwsl_wsi_thread(_w, ...) lwsl_wsi(_w, LLL_THREAD, __VA_ARGS__)
571 #define lwsl_wsi_thread(_w, ...) do {} while(0)
574 #if (_LWS_ENABLED_LOGS & LLL_USER)
575 #define lwsl_wsi_user(_w, ...) lwsl_wsi(_w, LLL_USER, __VA_ARGS__)
577 #define lwsl_wsi_user(_w, ...) do {} while(0)
580 #define lwsl_hexdump_wsi_err(_v, ...) lwsl_hexdump_wsi(_v, LLL_ERR, __VA_ARGS__)
581 #define lwsl_hexdump_wsi_warn(_v, ...) lwsl_hexdump_wsi(_v, LLL_WARN, __VA_ARGS__)
582 #define lwsl_hexdump_wsi_notice(_v, ...) lwsl_hexdump_wsi(_v, LLL_NOTICE, __VA_ARGS__)
583 #define lwsl_hexdump_wsi_info(_v, ...) lwsl_hexdump_wsi(_v, LLL_INFO, __VA_ARGS__)
584 #define lwsl_hexdump_wsi_debug(_v, ...) lwsl_hexdump_wsi(_v, LLL_DEBUG, __VA_ARGS__)
591 #if (_LWS_ENABLED_LOGS & LLL_ERR)
592 #define lwsl_ss_err(_w, ...) lwsl_ss(_w, LLL_ERR, __VA_ARGS__)
594 #define lwsl_ss_err(_w, ...) do {} while(0)
597 #if (_LWS_ENABLED_LOGS & LLL_WARN)
598 #define lwsl_ss_warn(_w, ...) lwsl_ss(_w, LLL_WARN, __VA_ARGS__)
600 #define lwsl_ss_warn(_w, ...) do {} while(0)
603 #if (_LWS_ENABLED_LOGS & LLL_NOTICE)
604 #define lwsl_ss_notice(_w, ...) lwsl_ss(_w, LLL_NOTICE, __VA_ARGS__)
606 #define lwsl_ss_notice(_w, ...) do {} while(0)
609 #if (_LWS_ENABLED_LOGS & LLL_INFO)
610 #define lwsl_ss_info(_w, ...) lwsl_ss(_w, LLL_INFO, __VA_ARGS__)
612 #define lwsl_ss_info(_w, ...) do {} while(0)
615 #if (_LWS_ENABLED_LOGS & LLL_DEBUG)
616 #define lwsl_ss_debug(_w, ...) lwsl_ss(_w, LLL_DEBUG, __VA_ARGS__)
618 #define lwsl_ss_debug(_w, ...) do {} while(0)
621 #if (_LWS_ENABLED_LOGS & LLL_PARSER)
622 #define lwsl_ss_parser(_w, ...) lwsl_ss(_w, LLL_PARSER, __VA_ARGS__)
624 #define lwsl_ss_parser(_w, ...) do {} while(0)
627 #if (_LWS_ENABLED_LOGS & LLL_HEADER)
628 #define lwsl_ss_header(_w, ...) lwsl_ss(_w, LLL_HEADER, __VA_ARGS__)
630 #define lwsl_ss_header(_w, ...) do {} while(0)
633 #if (_LWS_ENABLED_LOGS & LLL_EXT)
634 #define lwsl_ss_ext(_w, ...) lwsl_ss(_w, LLL_EXT, __VA_ARGS__)
636 #define lwsl_ss_ext(_w, ...) do {} while(0)
639 #if (_LWS_ENABLED_LOGS & LLL_CLIENT)
640 #define lwsl_ss_client(_w, ...) lwsl_ss(_w, LLL_CLIENT, __VA_ARGS__)
642 #define lwsl_ss_client(_w, ...) do {} while(0)
645 #if (_LWS_ENABLED_LOGS & LLL_LATENCY)
646 #define lwsl_ss_latency(_w, ...) lwsl_ss(_w, LLL_LATENCY, __VA_ARGS__)
648 #define lwsl_ss_latency(_w, ...) do {} while(0)
651 #if (_LWS_ENABLED_LOGS & LLL_THREAD)
652 #define lwsl_ss_thread(_w, ...) lwsl_ss(_w, LLL_THREAD, __VA_ARGS__)
654 #define lwsl_ss_thread(_w, ...) do {} while(0)
657 #if (_LWS_ENABLED_LOGS & LLL_USER)
658 #define lwsl_ss_user(_w, ...) lwsl_ss(_w, LLL_USER, __VA_ARGS__)
660 #define lwsl_ss_user(_w, ...) do {} while(0)
663 #define lwsl_hexdump_ss_err(_v, ...) lwsl_hexdump_ss(_v, LLL_ERR, __VA_ARGS__)
664 #define lwsl_hexdump_ss_warn(_v, ...) lwsl_hexdump_ss(_v, LLL_WARN, __VA_ARGS__)
665 #define lwsl_hexdump_ss_notice(_v, ...) lwsl_hexdump_ss(_v, LLL_NOTICE, __VA_ARGS__)
666 #define lwsl_hexdump_ss_info(_v, ...) lwsl_hexdump_ss(_v, LLL_INFO, __VA_ARGS__)
667 #define lwsl_hexdump_ss_debug(_v, ...) lwsl_hexdump_ss(_v, LLL_DEBUG, __VA_ARGS__)
681 LWS_VISIBLE LWS_EXTERN
void
684 LWS_VISIBLE LWS_EXTERN
void
685 lwsl_hexdump_level_cx(
lws_log_cx_t *cx, lws_log_prepend_cx_t prep,
void *obj,
686 int hexdump_level,
const void *vbuf,
size_t len);
698 LWS_VISIBLE LWS_EXTERN
void
704 static LWS_INLINE
int lws_is_be(
void) {
705 const int probe = ~0xff;
707 return *(
const char *)&probe;
729 LWS_VISIBLE LWS_EXTERN
void
741 LWS_VISIBLE LWS_EXTERN
void
757 LWS_VISIBLE LWS_EXTERN
void
771 LWS_VISIBLE LWS_EXTERN
void
783 LWS_VISIBLE LWS_EXTERN
int
788 LWS_VISIBLE LWS_EXTERN
const char *
789 lws_wsi_tag(
struct lws *wsi);
791 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:103
int32_t refcount
Definition: lws-logs.h:105
lws_log_prepend_cx_t prepend
Definition: lws-logs.h:94
void * stg
Definition: lws-logs.h:101
void * opaque
Definition: lws-logs.h:99
lws_log_use_cx_t refcount_cb
Definition: lws-logs.h:90
struct lws_log_cx * parent
Definition: lws-logs.h:97