diff options
author | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2018-02-11 01:17:41 +0100 |
---|---|---|
committer | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2018-02-11 01:17:41 +0100 |
commit | 94aac09d6af64ddd02696c5d0e277cfd322dbb72 (patch) | |
tree | 8194b59b4ca5348db6210d0751ab2b4f91a93d45 /src | |
parent | 66692c70d769734c83f1e67f716a1ecd14a924c5 (diff) |
log: add doxygen comments
Diffstat (limited to 'src')
-rw-r--r-- | src/log.c | 58 |
1 files changed, 58 insertions, 0 deletions
@@ -21,6 +21,11 @@ static struct { }; +/** + * Register a log handler + * + * @param log Log handler + */ void log_register_handler(struct log *log) { if (!log) @@ -30,6 +35,11 @@ void log_register_handler(struct log *log) } +/** + * Unregister a log handler + * + * @param log Log handler + */ void log_unregister_handler(struct log *log) { if (!log) @@ -39,12 +49,22 @@ void log_unregister_handler(struct log *log) } +/** + * Enable debug-level logging + * + * @param enable True to enable, false to disable + */ void log_enable_debug(bool enable) { lg.debug = enable; } +/** + * Enable info-level logging + * + * @param enable True to enable, false to disable + */ void log_enable_info(bool enable) { lg.info = enable; @@ -57,6 +77,13 @@ void log_enable_stderr(bool enable) } +/** + * Print a message to the logging system + * + * @param level Log level + * @param fmt Formatted message + * @param ap Variable argument list + */ void vlog(enum log_level level, const char *fmt, va_list ap) { char buf[4096]; @@ -91,6 +118,13 @@ void vlog(enum log_level level, const char *fmt, va_list ap) } +/** + * Print a message to the logging system + * + * @param level Log level + * @param fmt Formatted message + * @param ... Variable arguments + */ void loglv(enum log_level level, const char *fmt, ...) { va_list ap; @@ -107,6 +141,12 @@ void loglv(enum log_level level, const char *fmt, ...) } +/** + * Print a DEBUG message to the logging system + * + * @param fmt Formatted message + * @param ... Variable arguments + */ void debug(const char *fmt, ...) { va_list ap; @@ -120,6 +160,12 @@ void debug(const char *fmt, ...) } +/** + * Print an INFO message to the logging system + * + * @param fmt Formatted message + * @param ... Variable arguments + */ void info(const char *fmt, ...) { va_list ap; @@ -133,6 +179,12 @@ void info(const char *fmt, ...) } +/** + * Print a WARNING message to the logging system + * + * @param fmt Formatted message + * @param ... Variable arguments + */ void warning(const char *fmt, ...) { va_list ap; @@ -143,6 +195,12 @@ void warning(const char *fmt, ...) } +/** + * Print an ERROR message to the logging system + * + * @param fmt Formatted message + * @param ... Variable arguments + */ void error_msg(const char *fmt, ...) { va_list ap; |