Signed-off-by: Ran Benita <ran234@gmail.com>
void (*log_fn)(struct xkb_context *ctx, int priority,
const char *fmt, va_list args))
{
- ctx->log_fn = log_fn;
+ ctx->log_fn = (log_fn ? log_fn : default_log_fn);
}
XKB_EXPORT int
*/
/**
- * Sets the function to be called for logging messages, instead of the
- * default logger which writes to stderr.
+ * Sets the function to be called for logging messages.
+ * Passing NULL restores the default function, which logs to stderr.
**/
void
xkb_set_log_fn(struct xkb_context *context,