]> sigrok.org Git - libsigrok.git/blobdiff - log.c
Add initial README.devices file.
[libsigrok.git] / log.c
diff --git a/log.c b/log.c
index 3344d174ad4914c6c3f55b4d722cea1945bf8327..6ebede70418f6f56dd6d53576d24957089482299 100644 (file)
--- a/log.c
+++ b/log.c
 
 #include <stdarg.h>
 #include <stdio.h>
-#include "sigrok.h"
-#include "sigrok-internal.h"
+#include "libsigrok.h"
+#include "libsigrok-internal.h"
+
+/**
+ * @file
+ *
+ * Controlling the libsigrok message logging functionality.
+ */
+
+/**
+ * @defgroup grp_logging Logging
+ *
+ * Controlling the libsigrok message logging functionality.
+ *
+ * @{
+ */
 
 /* Currently selected libsigrok loglevel. Default: SR_LOG_WARN. */
 static int sr_loglevel = SR_LOG_WARN; /* Show errors+warnings per default. */
@@ -40,8 +54,10 @@ static sr_log_callback_t sr_log_callback = sr_logv;
 static void *sr_log_callback_data = NULL;
 
 /* Log domain (a short string that is used as prefix for all messages). */
+/** @cond PRIVATE */
 #define LOGDOMAIN_MAXLEN 30
 #define LOGDOMAIN_DEFAULT "sr: "
+/** @endcond */
 static char sr_log_domain[LOGDOMAIN_MAXLEN + 1] = LOGDOMAIN_DEFAULT;
 
 /**
@@ -190,6 +206,7 @@ static int sr_logv(void *cb_data, int loglevel, const char *format, va_list args
        return ret;
 }
 
+/** @private */
 SR_PRIV int sr_log(int loglevel, const char *format, ...)
 {
        int ret;
@@ -202,6 +219,7 @@ SR_PRIV int sr_log(int loglevel, const char *format, ...)
        return ret;
 }
 
+/** @private */
 SR_PRIV int sr_spew(const char *format, ...)
 {
        int ret;
@@ -214,6 +232,7 @@ SR_PRIV int sr_spew(const char *format, ...)
        return ret;
 }
 
+/** @private */
 SR_PRIV int sr_dbg(const char *format, ...)
 {
        int ret;
@@ -226,6 +245,7 @@ SR_PRIV int sr_dbg(const char *format, ...)
        return ret;
 }
 
+/** @private */
 SR_PRIV int sr_info(const char *format, ...)
 {
        int ret;
@@ -238,6 +258,7 @@ SR_PRIV int sr_info(const char *format, ...)
        return ret;
 }
 
+/** @private */
 SR_PRIV int sr_warn(const char *format, ...)
 {
        int ret;
@@ -250,6 +271,7 @@ SR_PRIV int sr_warn(const char *format, ...)
        return ret;
 }
 
+/** @private */
 SR_PRIV int sr_err(const char *format, ...)
 {
        int ret;
@@ -261,3 +283,5 @@ SR_PRIV int sr_err(const char *format, ...)
 
        return ret;
 }
+
+/** @} */