ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
websocket.h 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.h.

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 // Keep libwebsockets protocol chatter out of normal logs. NOTICE still
102 // reports lifecycle events; detailed traces remain available in dev builds.
103#ifdef CMAKE_BUILD_TYPE_DEBUG
104 int log_level = LLL_ERR | LLL_WARN | LLL_NOTICE | LLL_DEBUG;
105#else
106 int log_level = LLL_ERR | LLL_WARN | LLL_NOTICE;
107#endif
108 lws_set_log_level(log_level, websocket_client_lws_log_callback);
109}

◆ 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 // Keep libwebsockets protocol chatter out of normal logs. NOTICE still
90 // reports lifecycle events; detailed traces remain available in dev builds.
91#ifdef CMAKE_BUILD_TYPE_DEBUG
92 int log_level = LLL_ERR | LLL_WARN | LLL_NOTICE | LLL_DEBUG;
93#else
94 int log_level = LLL_ERR | LLL_WARN | LLL_NOTICE;
95#endif
96 lws_set_log_level(log_level, websocket_server_lws_log_callback);
97}

Referenced by websocket_server_init().