+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_log_loglevel_get(void)
+{
+ return cur_loglevel;
+}
+
+/**
+ * Set the libsigrokdecode logdomain string.
+ *
+ * @param logdomain The string to use as logdomain for libsigrokdecode log
+ * messages from now on. Must not be NULL. The maximum
+ * length of the string is 30 characters (this does not
+ * include the trailing NUL-byte). Longer strings are
+ * silently truncated.
+ * In order to not use a logdomain, pass an empty string.
+ * The function makes its own copy of the input string, i.e.
+ * the caller does not need to keep it around.
+ *
+ * @return SRD_OK upon success, SRD_ERR_ARG upon invalid logdomain.
+ *
+ * @since 0.1.0
+ */
+SRD_API int srd_log_logdomain_set(const char *logdomain)
+{
+ if (!logdomain) {
+ srd_err("log: %s: logdomain was NULL", __func__);
+ return SRD_ERR_ARG;
+ }
+
+ snprintf((char *)&srd_log_domain, LOGDOMAIN_MAXLEN, "%s", logdomain);
+
+ srd_dbg("Log domain set to '%s'.", (const char *)&srd_log_domain);
+
+ return SRD_OK;
+}
+
+/**
+ * Get the currently configured libsigrokdecode logdomain.
+ *
+ * @return A copy of the currently configured libsigrokdecode logdomain
+ * string. The caller is responsible for g_free()ing the string when
+ * it is no longer needed.
+ *
+ * @since 0.1.0