X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=log.c;h=6ebede70418f6f56dd6d53576d24957089482299;hb=cbc80f8f8afe28ff825449deffcc5aca7b51d7b8;hp=3344d174ad4914c6c3f55b4d722cea1945bf8327;hpb=b5118d6c013c4b5ae7ae146166750b3e392c4a14;p=libsigrok.git diff --git a/log.c b/log.c index 3344d174..6ebede70 100644 --- a/log.c +++ b/log.c @@ -20,8 +20,22 @@ #include #include -#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; } + +/** @} */