From: Richard Russon Date: Sat, 4 Aug 2018 21:12:46 +0000 (+0100) Subject: doxy: logging X-Git-Tag: 2019-10-25~712^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=66d1a55d7f7305549531f83107dafe06a4bafdbe;p=neomutt doxy: logging --- diff --git a/mutt/logging.c b/mutt/logging.c index 450c89414..13d372bba 100644 --- a/mutt/logging.c +++ b/mutt/logging.c @@ -328,7 +328,7 @@ void log_queue_empty(void) /** * log_queue_flush - Replay the log queue - * @param disp Log dispatcher + * @param disp Log dispatcher - Implements ::log_dispatcher_t * * Pass all of the log entries in the queue to the log dispatcher provided. * The queue will be emptied afterwards. @@ -375,14 +375,7 @@ int log_queue_save(FILE *fp) } /** - * log_disp_queue - Save a log line to an internal queue - * @param stamp Unix time - * @param file Source file - * @param line Source line - * @param function Source function - * @param level Logging level, e.g. #LL_WARNING - * @param ... Format string and parameters, like printf() - * @retval >0 Success, number of characters written + * log_disp_queue - Save a log line to an internal queue - Implements ::log_dispatcher_t * * This log dispatcher saves a line of text to a queue. * The format string and parameters are expanded and the other parameters are @@ -424,16 +417,7 @@ int log_disp_queue(time_t stamp, const char *file, int line, } /** - * log_disp_terminal - Save a log line to the terminal - * @param stamp Unix time (optional) - * @param file Source file (UNUSED) - * @param line Source line (UNUSED) - * @param function Source function - * @param level Logging level, e.g. #LL_WARNING - * @param ... Format string and parameters, like printf() - * @retval -1 Error - * @retval 0 Success, filtered - * @retval >0 Success, number of characters written + * log_disp_terminal - Save a log line to the terminal - Implements ::log_dispatcher_t * * This log dispatcher saves a line of text to the terminal. * The format is: diff --git a/mutt/logging.h b/mutt/logging.h index 72e39b6f3..c8b0f4da5 100644 --- a/mutt/logging.h +++ b/mutt/logging.h @@ -28,6 +28,18 @@ #include #include "queue.h" +/** + * log_dispatcher_t - Prototype for a logging function + * @param stamp Unix time (optional) + * @param file Source file + * @param line Source line + * @param function Source function + * @param level Logging level, e.g. #LL_WARNING + * @param ... Format string and parameters, like printf() + * @retval -1 Error + * @retval 0 Success, filtered + * @retval >0 Success, number of characters written + */ typedef int (*log_dispatcher_t)(time_t stamp, const char *file, int line, const char *function, int level, ...); extern log_dispatcher_t MuttLogger; diff --git a/mutt_logging.c b/mutt_logging.c index a0fc9ed5e..0688a9436 100644 --- a/mutt_logging.c +++ b/mutt_logging.c @@ -150,14 +150,7 @@ void mutt_clear_error(void) } /** - * log_disp_curses - Display a log line in the message line - * @param stamp Unix time - * @param file Source file - * @param line Source line - * @param function Source function - * @param level Logging level, e.g. #LL_WARNING - * @param ... Format string and parameters, like printf() - * @retval >0 Success, number of characters written + * log_disp_curses - Display a log line in the message line - Implements ::log_dispatcher_t */ int log_disp_curses(time_t stamp, const char *file, int line, const char *function, int level, ...)