X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcfg%2Flog.h;h=e9e8f9f1d3a41ca1d5bcadc8b187af0877dffa94;hb=d0897f06cd26e0778362671bc01274e5666748e5;hp=444c1d73219e3b36323d0e5ec9d9eca6258c454f;hpb=12ea7ad4a8eb2460e638367d256125c4535bd9b8;p=bertos.git diff --git a/bertos/cfg/log.h b/bertos/cfg/log.h index 444c1d73..e9e8f9f1 100644 --- a/bertos/cfg/log.h +++ b/bertos/cfg/log.h @@ -86,6 +86,7 @@ * \version $Id$ * \author Daniele Basile * + * $WIZ$ */ #ifndef CFG_LOG_H @@ -114,8 +115,7 @@ * The priority level go from error (highest) to info (lowest) (see cfg/debug.h * for more detail). * - * $WIZARD_LIST = { - * "log_level" : ["LOG_LVL_NONE", "LOG_LVL_ERR", "LOG_LVL_WARN", "LOG_LVL_INFO"] + * $WIZ$ log_level = "LOG_LVL_NONE", "LOG_LVL_ERR", "LOG_LVL_WARN", "LOG_LVL_INFO" * } */ #define LOG_LVL_NONE 0 @@ -129,9 +129,7 @@ * There are two logging format: terse and verbose. The latter prepends * function names and line number information to each log entry. * - * $WIZARD_LIST = { - * "log_format" : ["LOG_FMT_VERBOSE", "LOG_FMT_TERSE"] - * } + * $WIZ$ log_format = "LOG_FMT_VERBOSE", "LOG_FMT_TERSE" */ #define LOG_FMT_VERBOSE 1 #define LOG_FMT_TERSE 0 @@ -146,20 +144,27 @@ #if LOG_LEVEL >= LOG_LVL_ERR #define LOG_ERR(str,...) LOG_PRINT("ERR", str, ## __VA_ARGS__) + #define LOG_ERRB(x) x #else - #define LOG_ERR(str,...) /* Nothing */ + INLINE void LOG_ERR(UNUSED_ARG(const char *, fmt), ...) { /* nop */ } + #define LOG_ERRB(x) /* Nothing */ #endif #if LOG_LEVEL >= LOG_LVL_WARN #define LOG_WARN(str,...) LOG_PRINT("WARN", str, ## __VA_ARGS__) + #define LOG_WARNB(x) x #else - #define LOG_WARN(str,...) /* Nothing */ + INLINE void LOG_WARN(UNUSED_ARG(const char *, fmt), ...) { /* nop */ } + #define LOG_WARNB(x) /* Nothing */ #endif #if LOG_LEVEL >= LOG_LVL_INFO #define LOG_INFO(str,...) LOG_PRINT("INFO", str, ## __VA_ARGS__) + #define LOG_INFOB(x) x #else - #define LOG_INFO(str,...) /* Nothing */ + INLINE void LOG_INFO(UNUSED_ARG(const char *, fmt), ...) { /* nop */ } + #define LOG_INFOB(x) /* Nothing */ #endif + #endif /* CFG_LOG_H */