Documentation for <wlr/util/log.h>

Back to index

Table of contents

wlr_log_func_t()

typedef void (*wlr_log_func_t)(​enum wlr_log_importance importance, const char *fmt, va_list args);

wlr_log_get_verbosity()

enum wlr_log_importance wlr_log_get_verbosity(​void);

Get the current log verbosity configured by wlr_log_init().

enum wlr_log_importance

enum wlr_log_importance {
	WLR_SILENT,
	WLR_ERROR,
	WLR_INFO,
	WLR_DEBUG,
	WLR_LOG_IMPORTANCE_LAST,
};

wlr_log_init()

void wlr_log_init(​enum wlr_log_importance verbosity, wlr_log_func_t callback);

Set the log verbosity and callback.

Only messages less than or equal to the supplied verbosity will be logged. If the callback is NULL, the default logger is used.

This function can be called multiple times to update the verbosity or callback function.