ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
websocket.c File Reference

Libwebsockets logging integration. More...

Go to the source code of this file.

Functions

void lws_log_init_server (void)
 Initialize libwebsockets logging for server mode.
 
void lws_log_init_client (void)
 Initialize libwebsockets logging for client mode.
 

Detailed Description

Libwebsockets logging integration.

Routes libwebsockets log output through our logging system.

Definition in file websocket.c.

Function Documentation

◆ lws_log_init_client()

void lws_log_init_client ( void  )

Initialize libwebsockets logging for client mode.

Sets up the lws_set_log_level() callback to route client logs through our logging system with [LWS:client] prefix.

Definition at line 99 of file websocket.c.

99 {
100 // Enable libwebsockets logging with our custom callback
101 // In debug builds: include LLL_DEBUG for detailed TLS/handshake diagnostics
102 // In release builds: exclude DEBUG to reduce noise
103#ifdef CMAKE_BUILD_TYPE_DEBUG
104 int log_level = LLL_ERR | LLL_WARN | LLL_NOTICE | LLL_INFO | LLL_DEBUG;
105#else
106 int log_level = LLL_ERR | LLL_WARN | LLL_NOTICE | LLL_INFO;
107#endif
108 lws_set_log_level(log_level, websocket_client_lws_log_callback);
109}

Referenced by acip_websocket_client_transport_create().

◆ lws_log_init_server()

void lws_log_init_server ( void  )

Initialize libwebsockets logging for server mode.

Sets up the lws_set_log_level() callback to route server logs through our logging system with [LWS:server] prefix.

Definition at line 87 of file websocket.c.

87 {
88 // Enable libwebsockets logging with our custom callback
89 // In debug builds: include LLL_DEBUG for detailed TLS/handshake diagnostics
90 // In release builds: exclude DEBUG to reduce noise
91#ifdef CMAKE_BUILD_TYPE_DEBUG
92 int log_level = LLL_ERR | LLL_WARN | LLL_NOTICE | LLL_INFO | LLL_DEBUG;
93#else
94 int log_level = LLL_ERR | LLL_WARN | LLL_NOTICE | LLL_INFO;
95#endif
96 lws_set_log_level(log_level, websocket_server_lws_log_callback);
97}

Referenced by websocket_server_init().