diff -r e974640ec4e0 -r aa376dba1ba8 ucx/logging.h --- a/ucx/logging.h Wed Aug 14 16:07:49 2013 +0200 +++ b/ucx/logging.h Fri Aug 16 13:40:10 2013 +0200 @@ -44,14 +44,19 @@ #endif /* leave enough space for custom log levels */ + /** Log level for error messages. */ #define UCX_LOGGER_ERROR 0x00 + /** Log level for warning messages. */ #define UCX_LOGGER_WARN 0x10 + /** Log level for information messages. */ #define UCX_LOGGER_INFO 0x20 + /** Log level for debug messages. */ #define UCX_LOGGER_DEBUG 0x30 + /** Log level for trace messages. */ #define UCX_LOGGER_TRACE 0x40 @@ -61,12 +66,14 @@ * @see UcxLogger.mask */ #define UCX_LOGGER_LEVEL 0x01 + /** * Output flag for the timestmap. * If this flag is set, the log message will contain the timestmap. * @see UcxLogger.mask */ #define UCX_LOGGER_TIMESTAMP 0x02 + /** * Output flag for the source. * If this flag is set, the log message will contain the source file and line @@ -81,24 +88,28 @@ typedef struct { /** The stream this logger writes its messages to.*/ void *stream; + /** * The write function that shall be used. * For standard file or stdout loggers this might be standard fwrite * (default). */ write_func writer; + /** * The date format for timestamp outputs * (default: "%F %T %z "). * @see UCX_LOGGER_TIMESTAMP */ char *dateformat; + /** * The level, this logger operates on. * If a log command is issued, the message will only be logged, if the log * level of the message is less or equal than the log level of the logger. */ unsigned int level; + /** * A configuration mask for automatic output. * For each flag that is set, the logger automatically outputs some extra @@ -106,6 +117,7 @@ * See the documentation for the flags for details. */ unsigned int mask; + /** * A map of valid log levels for this logger. * @@ -128,6 +140,7 @@ * @return a new logger object */ UcxLogger *ucx_logger_new(void *stream, unsigned int level, unsigned int mask); + /** * Destroys the logger. * @@ -180,6 +193,7 @@ */ #define ucx_logger_error(logger, ...) \ ucx_logger_log(logger, UCX_LOGGER_ERROR, __VA_ARGS__) + /** * Shortcut for logging an information message. * @param logger the logger to use @@ -188,6 +202,7 @@ */ #define ucx_logger_info(logger, ...) \ ucx_logger_log(logger, UCX_LOGGER_INFO, __VA_ARGS__) + /** * Shortcut for logging a warning message. * @param logger the logger to use @@ -196,6 +211,7 @@ */ #define ucx_logger_warn(logger, ...) \ ucx_logger_log(logger, UCX_LOGGER_WARN, __VA_ARGS__) + /** * Shortcut for logging a debug message. * @param logger the logger to use @@ -204,6 +220,7 @@ */ #define ucx_logger_debug(logger, ...) \ ucx_logger_log(logger, UCX_LOGGER_DEBUG, __VA_ARGS__) + /** * Shortcut for logging a trace message. * @param logger the logger to use