X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=log.c;h=d6b293028b5912d3dbadea0553b8a59ca10a0b97;hb=9d1164f9a12c218def0e898e4d28fcd55f2fa8cd;hp=8cfcf53efda2c94133e0f19dbc30a62ab9589f08;hpb=b4bd70889f3009f5d836a9bf701725a6aceac039;p=libsigrok.git diff --git a/log.c b/log.c index 8cfcf53e..d6b29302 100644 --- a/log.c +++ b/log.c @@ -1,5 +1,5 @@ /* - * This file is part of the sigrok project. + * This file is part of the libsigrok project. * * Copyright (C) 2011-2012 Uwe Hermann * @@ -26,7 +26,15 @@ /** * @file * - * Logging support. + * Controlling the libsigrok message logging functionality. + */ + +/** + * @defgroup grp_logging Logging + * + * Controlling the libsigrok message logging functionality. + * + * @{ */ /* Currently selected libsigrok loglevel. Default: SR_LOG_WARN. */ @@ -66,6 +74,8 @@ static char sr_log_domain[LOGDOMAIN_MAXLEN + 1] = LOGDOMAIN_DEFAULT; * SR_LOG_INFO, SR_LOG_DBG, or SR_LOG_SPEW). * * @return SR_OK upon success, SR_ERR_ARG upon invalid loglevel. + * + * @since 0.1.0 */ SR_API int sr_log_loglevel_set(int loglevel) { @@ -85,6 +95,8 @@ SR_API int sr_log_loglevel_set(int loglevel) * Get the libsigrok loglevel. * * @return The currently configured libsigrok loglevel. + * + * @since 0.1.0 */ SR_API int sr_log_loglevel_get(void) { @@ -104,6 +116,8 @@ SR_API int sr_log_loglevel_get(void) * the caller does not need to keep it around. * * @return SR_OK upon success, SR_ERR_ARG upon invalid logdomain. + * + * @since 0.1.0 */ SR_API int sr_log_logdomain_set(const char *logdomain) { @@ -126,6 +140,8 @@ SR_API int sr_log_logdomain_set(const char *logdomain) * @return A copy of the currently configured libsigrok logdomain * string. The caller is responsible for g_free()ing the string when * it is no longer needed. + * + * @since 0.1.0 */ SR_API char *sr_log_logdomain_get(void) { @@ -144,6 +160,8 @@ SR_API char *sr_log_logdomain_get(void) * to be NULL if the caller doesn't need/want to pass any data. * * @return SR_OK upon success, SR_ERR_ARG upon invalid arguments. + * + * @since 0.1.0 */ SR_API int sr_log_callback_set(sr_log_callback_t cb, void *cb_data) { @@ -166,6 +184,8 @@ SR_API int sr_log_callback_set(sr_log_callback_t cb, void *cb_data) * Additionally, the internal 'sr_log_callback_data' pointer is set to NULL. * * @return SR_OK upon success, a negative error code otherwise. + * + * @since 0.1.0 */ SR_API int sr_log_callback_set_default(void) { @@ -275,3 +295,5 @@ SR_PRIV int sr_err(const char *format, ...) return ret; } + +/** @} */