diff -r bfa935ab7f85 -r 7fc65395188e src/ucx/logging.h --- a/src/ucx/logging.h Fri May 11 18:46:31 2018 +0200 +++ b/src/ucx/logging.h Fri May 11 19:48:19 2018 +0200 @@ -177,6 +177,18 @@ const unsigned int line, const char* format, ...); /** + * Registers a custom log level. + * @param logger the logger + * @param level the log level as unsigned integer + * @param name a string literal describing the level + */ +#define ucx_logger_register_level(logger, level, name) {\ + unsigned int l; \ + l = level; \ + ucx_map_int_put(logger->levels, l, (void*) "[" name "]"); \ + } while (0); + +/** * Logs a message at the specified level. * @param logger the logger to use * @param level the level to log the message on