mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
lwsl_visible
This commit is contained in:
parent
388f6c97fb
commit
c8b20910ec
2 changed files with 17 additions and 0 deletions
|
@ -1244,6 +1244,11 @@ LWS_VISIBLE void lws_set_log_level(int level,
|
|||
lwsl_emit = func;
|
||||
}
|
||||
|
||||
LWS_VISIBLE int lwsl_visible(int level)
|
||||
{
|
||||
return log_level & level;
|
||||
}
|
||||
|
||||
LWS_VISIBLE int
|
||||
lws_is_ssl(struct lws *wsi)
|
||||
{
|
||||
|
|
|
@ -385,6 +385,18 @@ lws_set_log_level(int level,
|
|||
LWS_VISIBLE LWS_EXTERN void
|
||||
lwsl_emit_syslog(int level, const char *line);
|
||||
|
||||
/**
|
||||
* lwsl_visible() - returns true if the log level should be printed
|
||||
*
|
||||
* \param 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 int
|
||||
lwsl_visible(int level);
|
||||
|
||||
///@}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue