-static int srd_logv(void *data, int loglevel, const char *format, va_list args)
-{
- int ret;
-
- /* This specific log handler doesn't need the void pointer data. */
- (void)data;
-
- /* Only output messages of at least the selected loglevel(s). */
- if (loglevel > srd_loglevel)
- return SRD_OK; /* TODO? */
-
- ret = vfprintf(stderr, format, args);
- fprintf(stderr, "\n");
-
- return ret;
-}
-
-int srd_log(int loglevel, const char *format, ...)
+/**
+ * Set the libsigrokdecode log callback to the default built-in one.
+ *
+ * Additionally, the internal 'srd_log_cb_data' pointer is set to NULL.
+ *
+ * @return SRD_OK upon success, a (negative) error code otherwise.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_log_callback_set_default(void)