libwebsockets
Lightweight C library for HTML5 websockets
|
Data Structures | |
struct | lws_log_cx |
union | lws_log_cx.u |
Macros | |
#define | LLL_ERR (1 << 0) |
#define | LLL_WARN (1 << 1) |
#define | LLL_NOTICE (1 << 2) |
#define | LLL_INFO (1 << 3) |
#define | LLL_DEBUG (1 << 4) |
#define | LLL_PARSER (1 << 5) |
#define | LLL_HEADER (1 << 6) |
#define | LLL_EXT (1 << 7) |
#define | LLL_CLIENT (1 << 8) |
#define | LLL_LATENCY (1 << 9) |
#define | LLL_USER (1 << 10) |
#define | LLL_THREAD (1 << 11) |
#define | LLL_COUNT (12) /* set to count of valid flags */ |
#define | LLLF_SECRECY_PII (1 << 16) |
#define | LLLF_SECRECY_BEARER (1 << 17) |
#define | LLLF_LOG_TIMESTAMP (1 << 18) |
#define | LLLF_LOG_CONTEXT_AWARE (1 << 30) |
#define | lwsl_cx(_c, _fil, ...) |
#define | lwsl_vhost(_v, _fil, ...) |
#define | lwsl_wsi(_w, _fil, ...) |
#define | lwsl_ss(_h, _fil, ...) |
#define | lwsl_hexdump_context(_c, _fil, _buf, _len) |
#define | lwsl_hexdump_vhost(_v, _fil, _buf, _len) |
#define | lwsl_hexdump_wsi(_w, _fil, _buf, _len) |
#define | lwsl_hexdump_ss(_h, _fil, _buf, _len) |
#define | _LWS_LINIT (LLL_ERR | LLL_USER | LLL_WARN | LLL_NOTICE) |
#define | _LWS_LBS 0 |
#define | _LWS_LBC 0 |
#define | _LWS_ENABLED_LOGS (((_LWS_LINIT) | (_LWS_LBS)) & ~(_LWS_LBC)) |
#define | lwsl_err(...) _lws_log(LLL_ERR, __VA_ARGS__) |
#define | lwsl_warn(...) _lws_log(LLL_WARN, __VA_ARGS__) |
#define | lwsl_notice(...) _lws_log(LLL_NOTICE, __VA_ARGS__) |
#define | lwsl_info(...) do {} while(0) |
#define | lwsl_debug(...) do {} while(0) |
#define | lwsl_parser(...) do {} while(0) |
#define | lwsl_header(...) do {} while(0) |
#define | lwsl_ext(...) do {} while(0) |
#define | lwsl_client(...) do {} while(0) |
#define | lwsl_latency(...) do {} while(0) |
#define | lwsl_thread(...) do {} while(0) |
#define | lwsl_user(...) _lws_log(LLL_USER, __VA_ARGS__) |
#define | lwsl_hexdump_err(...) lwsl_hexdump_level(LLL_ERR, __VA_ARGS__) |
#define | lwsl_hexdump_warn(...) lwsl_hexdump_level(LLL_WARN, __VA_ARGS__) |
#define | lwsl_hexdump_notice(...) lwsl_hexdump_level(LLL_NOTICE, __VA_ARGS__) |
#define | lwsl_hexdump_info(...) lwsl_hexdump_level(LLL_INFO, __VA_ARGS__) |
#define | lwsl_hexdump_debug(...) lwsl_hexdump_level(LLL_DEBUG, __VA_ARGS__) |
#define | lwsl_cx_err(_c, ...) lwsl_cx(_c, LLL_ERR, __VA_ARGS__) |
#define | lwsl_cx_warn(_c, ...) lwsl_cx(_c, LLL_WARN, __VA_ARGS__) |
#define | lwsl_cx_notice(_c, ...) lwsl_cx(_c, LLL_NOTICE, __VA_ARGS__) |
#define | lwsl_cx_info(_c, ...) do {} while(0) |
#define | lwsl_cx_debug(_c, ...) do {} while(0) |
#define | lwsl_cx_parser(_c, ...) do {} while(0) |
#define | lwsl_cx_header(_c, ...) do {} while(0) |
#define | lwsl_cx_ext(_c, ...) do {} while(0) |
#define | lwsl_cx_client(_c, ...) do {} while(0) |
#define | lwsl_cx_latency(_c, ...) do {} while(0) |
#define | lwsl_cx_thread(_c, ...) do {} while(0) |
#define | lwsl_cx_user(_c, ...) lwsl_cx(_c, LLL_USER, __VA_ARGS__) |
#define | lwsl_hexdump_cx_err(_c, ...) lwsl_hexdump_context(_c, LLL_ERR, __VA_ARGS__) |
#define | lwsl_hexdump_cx_warn(_c, ...) lwsl_hexdump_context(_c, LLL_WARN, __VA_ARGS__) |
#define | lwsl_hexdump_cx_notice(_c, ...) lwsl_hexdump_context(_c, LLL_NOTICE, __VA_ARGS__) |
#define | lwsl_hexdump_cx_info(_c, ...) lwsl_hexdump_context(_c, LLL_INFO, __VA_ARGS__) |
#define | lwsl_hexdump_cx_debug(_c, ...) lwsl_hexdump_context(_c, LLL_DEBUG, __VA_ARGS__) |
#define | lwsl_vhost_err(_v, ...) lwsl_vhost(_v, LLL_ERR, __VA_ARGS__) |
#define | lwsl_vhost_warn(_v, ...) lwsl_vhost(_v, LLL_WARN, __VA_ARGS__) |
#define | lwsl_vhost_notice(_v, ...) lwsl_vhost(_v, LLL_NOTICE, __VA_ARGS__) |
#define | lwsl_vhost_info(_v, ...) do {} while(0) |
#define | lwsl_vhost_debug(_v, ...) do {} while(0) |
#define | lwsl_vhost_parser(_v, ...) do {} while(0) |
#define | lwsl_vhost_header(_v, ...) do {} while(0) |
#define | lwsl_vhost_ext(_v, ...) do {} while(0) |
#define | lwsl_vhost_client(_v, ...) do {} while(0) |
#define | lwsl_vhost_latency(_v, ...) do {} while(0) |
#define | lwsl_vhost_thread(_v, ...) do {} while(0) |
#define | lwsl_vhost_user(_v, ...) lwsl_vhost(_v, LLL_USER, __VA_ARGS__) |
#define | lwsl_hexdump_vhost_err(_v, ...) lwsl_hexdump_vhost(_v, LLL_ERR, __VA_ARGS__) |
#define | lwsl_hexdump_vhost_warn(_v, ...) lwsl_hexdump_vhost(_v, LLL_WARN, __VA_ARGS__) |
#define | lwsl_hexdump_vhost_notice(_v, ...) lwsl_hexdump_vhost(_v, LLL_NOTICE, __VA_ARGS__) |
#define | lwsl_hexdump_vhost_info(_v, ...) lwsl_hexdump_vhost(_v, LLL_INFO, __VA_ARGS__) |
#define | lwsl_hexdump_vhost_debug(_v, ...) lwsl_hexdump_vhost(_v, LLL_DEBUG, __VA_ARGS__) |
#define | lwsl_wsi_err(_w, ...) lwsl_wsi(_w, LLL_ERR, __VA_ARGS__) |
#define | lwsl_wsi_warn(_w, ...) lwsl_wsi(_w, LLL_WARN, __VA_ARGS__) |
#define | lwsl_wsi_notice(_w, ...) lwsl_wsi(_w, LLL_NOTICE, __VA_ARGS__) |
#define | lwsl_wsi_info(_w, ...) do {} while(0) |
#define | lwsl_wsi_debug(_w, ...) do {} while(0) |
#define | lwsl_wsi_parser(_w, ...) do {} while(0) |
#define | lwsl_wsi_header(_w, ...) do {} while(0) |
#define | lwsl_wsi_ext(_w, ...) do {} while(0) |
#define | lwsl_wsi_client(_w, ...) do {} while(0) |
#define | lwsl_wsi_latency(_w, ...) do {} while(0) |
#define | lwsl_wsi_thread(_w, ...) do {} while(0) |
#define | lwsl_wsi_user(_w, ...) lwsl_wsi(_w, LLL_USER, __VA_ARGS__) |
#define | lwsl_hexdump_wsi_err(_v, ...) lwsl_hexdump_wsi(_v, LLL_ERR, __VA_ARGS__) |
#define | lwsl_hexdump_wsi_warn(_v, ...) lwsl_hexdump_wsi(_v, LLL_WARN, __VA_ARGS__) |
#define | lwsl_hexdump_wsi_notice(_v, ...) lwsl_hexdump_wsi(_v, LLL_NOTICE, __VA_ARGS__) |
#define | lwsl_hexdump_wsi_info(_v, ...) lwsl_hexdump_wsi(_v, LLL_INFO, __VA_ARGS__) |
#define | lwsl_hexdump_wsi_debug(_v, ...) lwsl_hexdump_wsi(_v, LLL_DEBUG, __VA_ARGS__) |
#define | lwsl_ss_err(_w, ...) lwsl_ss(_w, LLL_ERR, __VA_ARGS__) |
#define | lwsl_ss_warn(_w, ...) lwsl_ss(_w, LLL_WARN, __VA_ARGS__) |
#define | lwsl_ss_notice(_w, ...) lwsl_ss(_w, LLL_NOTICE, __VA_ARGS__) |
#define | lwsl_ss_info(_w, ...) do {} while(0) |
#define | lwsl_ss_debug(_w, ...) do {} while(0) |
#define | lwsl_ss_parser(_w, ...) do {} while(0) |
#define | lwsl_ss_header(_w, ...) do {} while(0) |
#define | lwsl_ss_ext(_w, ...) do {} while(0) |
#define | lwsl_ss_client(_w, ...) do {} while(0) |
#define | lwsl_ss_latency(_w, ...) do {} while(0) |
#define | lwsl_ss_thread(_w, ...) do {} while(0) |
#define | lwsl_ss_user(_w, ...) lwsl_ss(_w, LLL_USER, __VA_ARGS__) |
#define | lwsl_hexdump_ss_err(_v, ...) lwsl_hexdump_ss(_v, LLL_ERR, __VA_ARGS__) |
#define | lwsl_hexdump_ss_warn(_v, ...) lwsl_hexdump_ss(_v, LLL_WARN, __VA_ARGS__) |
#define | lwsl_hexdump_ss_notice(_v, ...) lwsl_hexdump_ss(_v, LLL_NOTICE, __VA_ARGS__) |
#define | lwsl_hexdump_ss_info(_v, ...) lwsl_hexdump_ss(_v, LLL_INFO, __VA_ARGS__) |
#define | lwsl_hexdump_ss_debug(_v, ...) lwsl_hexdump_ss(_v, LLL_DEBUG, __VA_ARGS__) |
Typedefs | |
typedef void(* | lws_log_emit_t) (int level, const char *line) |
typedef void(* | lws_log_emit_cx_t) (struct lws_log_cx *cx, int level, const char *line, size_t len) |
typedef void(* | lws_log_prepend_cx_t) (struct lws_log_cx *cx, void *obj, char **p, char *e) |
typedef void(* | lws_log_use_cx_t) (struct lws_log_cx *cx, int _new) |
typedef struct lws_log_cx | lws_log_cx_t |
Lws provides flexible and filterable logging facilities, which can be used inside lws and in user code.
Log categories may be individually filtered bitwise, and directed to built-in sinks for syslog-compatible logging, or a user-defined function.
Traditional logs use a single, processwide logging context. New style log apis (lws_xxx_cx()) can pass the logging context to use in.
struct lws_log_cx |
Definition at line 80 of file lws-logs.h.
Data Fields | ||
---|---|---|
union lws_log_cx | u | |
lws_log_use_cx_t | refcount_cb |
NULL, or a function called after each change to .refcount below, this enables implementing side-effects like opening and closing log files when the first and last object binds / unbinds |
lws_log_prepend_cx_t | prepend |
NULL, or a cb to optionally prepend a string to logs we are a parent of |
struct lws_log_cx * | parent |
NULL, or points to log ctx we are a child of |
void * | opaque |
ignored by lws, used to pass config to emit_cx, eg, filepath |
void * | stg |
ignored by lws, may be used a storage by refcount_cb / emit_cx |
uint32_t | lll_flags |
mask of log levels we want to emit in this context |
int32_t | refcount |
refcount of objects bound to this log context |
union lws_log_cx.u |
Definition at line 81 of file lws-logs.h.
Data Fields | ||
---|---|---|
lws_log_emit_t | emit | |
lws_log_emit_cx_t | emit_cx |
#define LLL_ERR (1 << 0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 40 of file lws-logs.h.
#define LLL_WARN (1 << 1) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 41 of file lws-logs.h.
#define LLL_NOTICE (1 << 2) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 42 of file lws-logs.h.
#define LLL_INFO (1 << 3) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 43 of file lws-logs.h.
#define LLL_DEBUG (1 << 4) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 44 of file lws-logs.h.
#define LLL_PARSER (1 << 5) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 45 of file lws-logs.h.
#define LLL_HEADER (1 << 6) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 46 of file lws-logs.h.
#define LLL_EXT (1 << 7) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 47 of file lws-logs.h.
#define LLL_CLIENT (1 << 8) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 48 of file lws-logs.h.
#define LLL_LATENCY (1 << 9) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 49 of file lws-logs.h.
#define LLL_USER (1 << 10) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 50 of file lws-logs.h.
#define LLL_THREAD (1 << 11) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 51 of file lws-logs.h.
#define LLL_COUNT (12) /* set to count of valid flags */ |
#include <include/libwebsockets/lws-logs.h>
Definition at line 53 of file lws-logs.h.
#define LLLF_SECRECY_PII (1 << 16) |
#include <include/libwebsockets/lws-logs.h>
contains Personally Identifiable Information
Definition at line 56 of file lws-logs.h.
#define LLLF_SECRECY_BEARER (1 << 17) |
#include <include/libwebsockets/lws-logs.h>
possession of this data allows impersonation
Definition at line 58 of file lws-logs.h.
#define LLLF_LOG_TIMESTAMP (1 << 18) |
#include <include/libwebsockets/lws-logs.h>
set to prepend logs with timestamp
Definition at line 61 of file lws-logs.h.
#define LLLF_LOG_CONTEXT_AWARE (1 << 30) |
#include <include/libwebsockets/lws-logs.h>
set if the context uses an emit function that takes the logctx, auto- applied when setting emit using lws_set_log_level_cx() api
Definition at line 65 of file lws-logs.h.
#define lwsl_cx | ( | _c, | |
_fil, | |||
... | |||
) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 180 of file lws-logs.h.
#define lwsl_vhost | ( | _v, | |
_fil, | |||
... | |||
) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 183 of file lws-logs.h.
#define lwsl_wsi | ( | _w, | |
_fil, | |||
... | |||
) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 186 of file lws-logs.h.
#define lwsl_ss | ( | _h, | |
_fil, | |||
... | |||
) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 189 of file lws-logs.h.
#define lwsl_hexdump_context | ( | _c, | |
_fil, | |||
_buf, | |||
_len | |||
) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 193 of file lws-logs.h.
#define lwsl_hexdump_vhost | ( | _v, | |
_fil, | |||
_buf, | |||
_len | |||
) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 197 of file lws-logs.h.
#define lwsl_hexdump_wsi | ( | _w, | |
_fil, | |||
_buf, | |||
_len | |||
) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 201 of file lws-logs.h.
#define lwsl_hexdump_ss | ( | _h, | |
_fil, | |||
_buf, | |||
_len | |||
) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 205 of file lws-logs.h.
#define _LWS_LINIT (LLL_ERR | LLL_USER | LLL_WARN | LLL_NOTICE) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 227 of file lws-logs.h.
#define _LWS_LBS 0 |
#include <include/libwebsockets/lws-logs.h>
Definition at line 243 of file lws-logs.h.
#define _LWS_LBC 0 |
#include <include/libwebsockets/lws-logs.h>
Definition at line 249 of file lws-logs.h.
#define _LWS_ENABLED_LOGS (((_LWS_LINIT) | (_LWS_LBS)) & ~(_LWS_LBC)) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 255 of file lws-logs.h.
#include <include/libwebsockets/lws-logs.h>
Definition at line 267 of file lws-logs.h.
#include <include/libwebsockets/lws-logs.h>
Definition at line 273 of file lws-logs.h.
#define lwsl_notice | ( | ... | ) | _lws_log(LLL_NOTICE, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 279 of file lws-logs.h.
#define lwsl_info | ( | ... | ) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 287 of file lws-logs.h.
#define lwsl_debug | ( | ... | ) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 293 of file lws-logs.h.
#define lwsl_parser | ( | ... | ) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 299 of file lws-logs.h.
#define lwsl_header | ( | ... | ) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 305 of file lws-logs.h.
#define lwsl_ext | ( | ... | ) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 311 of file lws-logs.h.
#define lwsl_client | ( | ... | ) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 317 of file lws-logs.h.
#define lwsl_latency | ( | ... | ) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 323 of file lws-logs.h.
#define lwsl_thread | ( | ... | ) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 329 of file lws-logs.h.
#include <include/libwebsockets/lws-logs.h>
Definition at line 333 of file lws-logs.h.
#define lwsl_hexdump_err | ( | ... | ) | lwsl_hexdump_level(LLL_ERR, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 338 of file lws-logs.h.
#define lwsl_hexdump_warn | ( | ... | ) | lwsl_hexdump_level(LLL_WARN, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 339 of file lws-logs.h.
#define lwsl_hexdump_notice | ( | ... | ) | lwsl_hexdump_level(LLL_NOTICE, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 340 of file lws-logs.h.
#define lwsl_hexdump_info | ( | ... | ) | lwsl_hexdump_level(LLL_INFO, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 341 of file lws-logs.h.
#define lwsl_hexdump_debug | ( | ... | ) | lwsl_hexdump_level(LLL_DEBUG, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 342 of file lws-logs.h.
#include <include/libwebsockets/lws-logs.h>
Definition at line 349 of file lws-logs.h.
#include <include/libwebsockets/lws-logs.h>
Definition at line 355 of file lws-logs.h.
#define lwsl_cx_notice | ( | _c, | |
... | |||
) | lwsl_cx(_c, LLL_NOTICE, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 361 of file lws-logs.h.
#define lwsl_cx_info | ( | _c, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 369 of file lws-logs.h.
#define lwsl_cx_debug | ( | _c, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 375 of file lws-logs.h.
#define lwsl_cx_parser | ( | _c, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 381 of file lws-logs.h.
#define lwsl_cx_header | ( | _c, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 387 of file lws-logs.h.
#define lwsl_cx_ext | ( | _c, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 393 of file lws-logs.h.
#define lwsl_cx_client | ( | _c, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 399 of file lws-logs.h.
#define lwsl_cx_latency | ( | _c, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 405 of file lws-logs.h.
#define lwsl_cx_thread | ( | _c, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 411 of file lws-logs.h.
#include <include/libwebsockets/lws-logs.h>
Definition at line 415 of file lws-logs.h.
#define lwsl_hexdump_cx_err | ( | _c, | |
... | |||
) | lwsl_hexdump_context(_c, LLL_ERR, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 420 of file lws-logs.h.
#define lwsl_hexdump_cx_warn | ( | _c, | |
... | |||
) | lwsl_hexdump_context(_c, LLL_WARN, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 421 of file lws-logs.h.
#define lwsl_hexdump_cx_notice | ( | _c, | |
... | |||
) | lwsl_hexdump_context(_c, LLL_NOTICE, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 422 of file lws-logs.h.
#define lwsl_hexdump_cx_info | ( | _c, | |
... | |||
) | lwsl_hexdump_context(_c, LLL_INFO, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 423 of file lws-logs.h.
#define lwsl_hexdump_cx_debug | ( | _c, | |
... | |||
) | lwsl_hexdump_context(_c, LLL_DEBUG, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 424 of file lws-logs.h.
#define lwsl_vhost_err | ( | _v, | |
... | |||
) | lwsl_vhost(_v, LLL_ERR, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 431 of file lws-logs.h.
#define lwsl_vhost_warn | ( | _v, | |
... | |||
) | lwsl_vhost(_v, LLL_WARN, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 437 of file lws-logs.h.
#define lwsl_vhost_notice | ( | _v, | |
... | |||
) | lwsl_vhost(_v, LLL_NOTICE, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 443 of file lws-logs.h.
#define lwsl_vhost_info | ( | _v, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 451 of file lws-logs.h.
#define lwsl_vhost_debug | ( | _v, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 457 of file lws-logs.h.
#define lwsl_vhost_parser | ( | _v, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 463 of file lws-logs.h.
#define lwsl_vhost_header | ( | _v, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 469 of file lws-logs.h.
#define lwsl_vhost_ext | ( | _v, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 475 of file lws-logs.h.
#define lwsl_vhost_client | ( | _v, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 481 of file lws-logs.h.
#define lwsl_vhost_latency | ( | _v, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 487 of file lws-logs.h.
#define lwsl_vhost_thread | ( | _v, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 493 of file lws-logs.h.
#define lwsl_vhost_user | ( | _v, | |
... | |||
) | lwsl_vhost(_v, LLL_USER, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 497 of file lws-logs.h.
#define lwsl_hexdump_vhost_err | ( | _v, | |
... | |||
) | lwsl_hexdump_vhost(_v, LLL_ERR, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 502 of file lws-logs.h.
#define lwsl_hexdump_vhost_warn | ( | _v, | |
... | |||
) | lwsl_hexdump_vhost(_v, LLL_WARN, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 503 of file lws-logs.h.
#define lwsl_hexdump_vhost_notice | ( | _v, | |
... | |||
) | lwsl_hexdump_vhost(_v, LLL_NOTICE, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 504 of file lws-logs.h.
#define lwsl_hexdump_vhost_info | ( | _v, | |
... | |||
) | lwsl_hexdump_vhost(_v, LLL_INFO, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 505 of file lws-logs.h.
#define lwsl_hexdump_vhost_debug | ( | _v, | |
... | |||
) | lwsl_hexdump_vhost(_v, LLL_DEBUG, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 506 of file lws-logs.h.
#include <include/libwebsockets/lws-logs.h>
Definition at line 514 of file lws-logs.h.
#include <include/libwebsockets/lws-logs.h>
Definition at line 520 of file lws-logs.h.
#define lwsl_wsi_notice | ( | _w, | |
... | |||
) | lwsl_wsi(_w, LLL_NOTICE, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 526 of file lws-logs.h.
#define lwsl_wsi_info | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 534 of file lws-logs.h.
#define lwsl_wsi_debug | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 540 of file lws-logs.h.
#define lwsl_wsi_parser | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 546 of file lws-logs.h.
#define lwsl_wsi_header | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 552 of file lws-logs.h.
#define lwsl_wsi_ext | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 558 of file lws-logs.h.
#define lwsl_wsi_client | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 564 of file lws-logs.h.
#define lwsl_wsi_latency | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 570 of file lws-logs.h.
#define lwsl_wsi_thread | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 576 of file lws-logs.h.
#include <include/libwebsockets/lws-logs.h>
Definition at line 580 of file lws-logs.h.
#define lwsl_hexdump_wsi_err | ( | _v, | |
... | |||
) | lwsl_hexdump_wsi(_v, LLL_ERR, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 585 of file lws-logs.h.
#define lwsl_hexdump_wsi_warn | ( | _v, | |
... | |||
) | lwsl_hexdump_wsi(_v, LLL_WARN, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 586 of file lws-logs.h.
#define lwsl_hexdump_wsi_notice | ( | _v, | |
... | |||
) | lwsl_hexdump_wsi(_v, LLL_NOTICE, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 587 of file lws-logs.h.
#define lwsl_hexdump_wsi_info | ( | _v, | |
... | |||
) | lwsl_hexdump_wsi(_v, LLL_INFO, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 588 of file lws-logs.h.
#define lwsl_hexdump_wsi_debug | ( | _v, | |
... | |||
) | lwsl_hexdump_wsi(_v, LLL_DEBUG, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 589 of file lws-logs.h.
#include <include/libwebsockets/lws-logs.h>
Definition at line 597 of file lws-logs.h.
#include <include/libwebsockets/lws-logs.h>
Definition at line 603 of file lws-logs.h.
#define lwsl_ss_notice | ( | _w, | |
... | |||
) | lwsl_ss(_w, LLL_NOTICE, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 609 of file lws-logs.h.
#define lwsl_ss_info | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 617 of file lws-logs.h.
#define lwsl_ss_debug | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 623 of file lws-logs.h.
#define lwsl_ss_parser | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 629 of file lws-logs.h.
#define lwsl_ss_header | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 635 of file lws-logs.h.
#define lwsl_ss_ext | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 641 of file lws-logs.h.
#define lwsl_ss_client | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 647 of file lws-logs.h.
#define lwsl_ss_latency | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 653 of file lws-logs.h.
#define lwsl_ss_thread | ( | _w, | |
... | |||
) | do {} while(0) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 659 of file lws-logs.h.
#include <include/libwebsockets/lws-logs.h>
Definition at line 663 of file lws-logs.h.
#define lwsl_hexdump_ss_err | ( | _v, | |
... | |||
) | lwsl_hexdump_ss(_v, LLL_ERR, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 668 of file lws-logs.h.
#define lwsl_hexdump_ss_warn | ( | _v, | |
... | |||
) | lwsl_hexdump_ss(_v, LLL_WARN, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 669 of file lws-logs.h.
#define lwsl_hexdump_ss_notice | ( | _v, | |
... | |||
) | lwsl_hexdump_ss(_v, LLL_NOTICE, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 670 of file lws-logs.h.
#define lwsl_hexdump_ss_info | ( | _v, | |
... | |||
) | lwsl_hexdump_ss(_v, LLL_INFO, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 671 of file lws-logs.h.
#define lwsl_hexdump_ss_debug | ( | _v, | |
... | |||
) | lwsl_hexdump_ss(_v, LLL_DEBUG, __VA_ARGS__) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 672 of file lws-logs.h.
typedef void(* lws_log_emit_t) (int level, const char *line) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 69 of file lws-logs.h.
typedef void(* lws_log_emit_cx_t) (struct lws_log_cx *cx, int level, const char *line, size_t len) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 70 of file lws-logs.h.
typedef void(* lws_log_prepend_cx_t) (struct lws_log_cx *cx, void *obj, char **p, char *e) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 72 of file lws-logs.h.
typedef void(* lws_log_use_cx_t) (struct lws_log_cx *cx, int _new) |
#include <include/libwebsockets/lws-logs.h>
Definition at line 74 of file lws-logs.h.
typedef struct lws_log_cx lws_log_cx_t |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN int lwsl_timestamp | ( | int | level, |
char * | p, | ||
size_t | len | ||
) |
#include <include/libwebsockets/lws-logs.h>
lwsl_timestamp: generate logging timestamp string
level | logging level |
p | char * buffer to take timestamp |
len | length of p |
returns length written in p
LWS_VISIBLE LWS_EXTERN void _lws_log | ( | int | filter, |
const char * | format, | ||
... | |||
) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN void _lws_logv | ( | int | filter, |
const char * | format, | ||
va_list | vl | ||
) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN struct lws_log_cx* lwsl_context_get_cx | ( | struct lws_context * | cx | ) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN struct lws_log_cx* lwsl_vhost_get_cx | ( | struct lws_vhost * | vh | ) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN struct lws_log_cx* lwsl_wsi_get_cx | ( | struct lws * | wsi | ) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN void lws_log_emit_cx_file | ( | struct lws_log_cx * | cx, |
int | level, | ||
const char * | line, | ||
size_t | len | ||
) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN void lws_log_use_cx_file | ( | struct lws_log_cx * | cx, |
int | _new | ||
) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN void lws_log_prepend_context | ( | struct lws_log_cx * | cx, |
void * | obj, | ||
char ** | p, | ||
char * | e | ||
) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN void lws_log_prepend_vhost | ( | struct lws_log_cx * | cx, |
void * | obj, | ||
char ** | p, | ||
char * | e | ||
) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN void lws_log_prepend_wsi | ( | struct lws_log_cx * | cx, |
void * | obj, | ||
char ** | p, | ||
char * | e | ||
) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN void _lws_log_cx | ( | lws_log_cx_t * | cx, |
lws_log_prepend_cx_t | prep, | ||
void * | obj, | ||
int | filter, | ||
const char * | _fun, | ||
const char * | format, | ||
... | |||
) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN void lwsl_hexdump_level | ( | int | level, |
const void * | vbuf, | ||
size_t | len | ||
) |
#include <include/libwebsockets/lws-logs.h>
lwsl_hexdump_level() - helper to hexdump a buffer at a selected debug level
level | one of LLL_ constants |
vbuf | buffer start to dump |
len | length of buffer to dump |
If level
is visible, does a nice hexdump -C style dump of vbuf
for len
bytes. This can be extremely convenient while debugging.
LWS_VISIBLE LWS_EXTERN void lwsl_hexdump_level_cx | ( | lws_log_cx_t * | cx, |
lws_log_prepend_cx_t | prep, | ||
void * | obj, | ||
int | hexdump_level, | ||
const void * | vbuf, | ||
size_t | len | ||
) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN void lwsl_hexdump | ( | const void * | buf, |
size_t | len | ||
) |
#include <include/libwebsockets/lws-logs.h>
lwsl_hexdump() - helper to hexdump a buffer (DEBUG builds only)
buf | buffer start to dump |
len | length of buffer to dump |
Calls through to lwsl_hexdump_level(LLL_DEBUG, ... for compatability. It's better to use lwsl_hexdump_level(level, ... directly so you can control the visibility.
LWS_VISIBLE LWS_EXTERN void lws_set_log_level | ( | int | level, |
lws_log_emit_t | log_emit_function | ||
) |
#include <include/libwebsockets/lws-logs.h>
lws_set_log_level() - Set the logging bitfield
level | OR together the LLL_ debug contexts you want output from |
log_emit_function | NULL to leave it as it is, or a user-supplied function to perform log string emission instead of the default stderr one. |
log level defaults to "err", "warn" and "notice" contexts enabled and emission on stderr. If stderr is a tty (according to isatty()) then the output is coloured according to the log level using ANSI escapes.
You can set the default security level for logging using the secrecy_and_log_level() macro to set the level
parameter, eg
lws_set_log_level(secrecy_and_log_level(LWS_SECRECY_PII, LLL_ERR | LLL_WARN), my_emit_function);
Normally you can just leave it at the default.
LWS_VISIBLE LWS_EXTERN void lwsl_emit_syslog | ( | int | level, |
const char * | line | ||
) |
#include <include/libwebsockets/lws-logs.h>
lwsl_emit_syslog() - helper log emit function writes to system log
level | one of LLL_ log level indexes |
line | log string |
You use this by passing the function pointer to lws_set_log_level(), to set it as the log emit function, it is not called directly.
LWS_VISIBLE LWS_EXTERN void lwsl_emit_stderr | ( | int | level, |
const char * | line | ||
) |
#include <include/libwebsockets/lws-logs.h>
lwsl_emit_stderr() - helper log emit function writes to stderr
level | one of LLL_ log level indexes |
line | log string |
You use this by passing the function pointer to lws_set_log_level(), to set it as the log emit function, it is not called directly.
It prepends a system timestamp like [2018/11/13 07:41:57:3989]
If stderr is a tty, then ansi colour codes are added.
LWS_VISIBLE LWS_EXTERN void lwsl_emit_stderr_notimestamp | ( | int | level, |
const char * | line | ||
) |
#include <include/libwebsockets/lws-logs.h>
lwsl_emit_stderr_notimestamp() - helper log emit function writes to stderr
level | one of LLL_ log level indexes |
line | log string |
You use this by passing the function pointer to lws_set_log_level(), to set it as the log emit function, it is not called directly.
If stderr is a tty, then ansi colour codes are added.
LWS_VISIBLE LWS_EXTERN int lwsl_visible | ( | int | level | ) |
#include <include/libwebsockets/lws-logs.h>
lwsl_visible() - returns true if the log level should be printed
level | one of LLL_ log level indexes |
This is useful if you have to do work to generate the log content, you can skip the work if the log level used to print it is not actually enabled at runtime.
LWS_VISIBLE LWS_EXTERN const char* lws_wsi_tag | ( | struct lws * | wsi | ) |
#include <include/libwebsockets/lws-logs.h>
LWS_VISIBLE LWS_EXTERN void lwsl_refcount_cx | ( | lws_log_cx_t * | cx, |
int | _new | ||
) |
#include <include/libwebsockets/lws-logs.h>