X-Git-Url: https://www.flypig.org.uk/git/?p=libcontrac.git;a=blobdiff_plain;f=include%2Fcontrac%2Flog.h;h=8e8dae83461e756a267c411c1fd9485000b31d59;hp=0e7abee3de572e8cb075bfc68d632a4c2653e41d;hb=e48c390a86b448137a87d0d0a5863c202ba66abd;hpb=f8c83387f5abffa94e59332382441a71f5b95545 diff --git a/include/contrac/log.h b/include/contrac/log.h index 0e7abee..8e8dae8 100644 --- a/include/contrac/log.h +++ b/include/contrac/log.h @@ -1,19 +1,25 @@ -/** \ingroup contrac +/** \ingroup Logging * @file - * @author David Llewellyn-Jones + * @author David Llewellyn-Jones * @version $(VERSION) * * @section LICENSE * + * Copyright David Llewellyn-Jones, 2020 + * Released under the GPLv2. * - * - * @brief + * @brief Allows output to be sent to the log * @section DESCRIPTION * - * + * This is a simple set of functions and macros that allows strings to be + * recorded in the syslog. * */ +/** \addtogroup Logging + * @{ + */ + #ifndef __LOG_H #define __LOG_H @@ -23,6 +29,20 @@ // Defines +/** + * Log a string to syslog. + * + * Constructs a message using the supplied format and parameters and records it + * in the system log. The format is the same as for printf. + * + * The logging levels are the standard syslog levels: + * + * LOG_DEBUG, LOG_INFO, LOG_WARNING, LOG_ERR, etc. + * + * @param priority The log level priority. + * @param format The format for the message, the same as for printf. + * @param ... parameters to combine with the format to create the message. + */ #define LOG(level, ...) log_priority(level, __VA_ARGS__); // Structures @@ -34,3 +54,5 @@ void log_priority(int priority, const char *format, ...); // Function definitions #endif // __LOG_H + +/** @} addtogroup Logging*/