X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcfg%2Flog.h;h=ec3882bd43b53067afb96dc7e1760cafa3cd10c2;hb=2156a825ba83da6e71a78237285a5558956da549;hp=08bd55e84871f95a03fae1dd7ca379386e307bf5;hpb=5bd1a03b20e70a66ae0571be7eeb78c972629fe1;p=bertos.git diff --git a/bertos/cfg/log.h b/bertos/cfg/log.h index 08bd55e8..ec3882bd 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 @@ -113,24 +114,25 @@ * but if choose a hight level you link only that have the priority egual or hight. * The priority level go from error (highest) to info (lowest) (see cfg/debug.h * for more detail). - * \{ + * + * $WIZ$ log_level = "LOG_LVL_NONE", "LOG_LVL_ERR", "LOG_LVL_WARN", "LOG_LVL_INFO" + * } */ #define LOG_LVL_NONE 0 #define LOG_LVL_ERR 1 #define LOG_LVL_WARN 2 #define LOG_LVL_INFO 3 -/* \} */ /** * \name Logging format * * There are two logging format: terse and verbose. The latter prepends * function names and line number information to each log entry. - * \{ + * + * $WIZ$ log_format = "LOG_FMT_VERBOSE", "LOG_FMT_TERSE" */ #define LOG_FMT_VERBOSE 1 #define LOG_FMT_TERSE 0 -/* \} */ #if LOG_FORMAT == LOG_FMT_VERBOSE #define LOG_PRINT(str_level, str,...) kprintf("%s():%d:%s: " str, __func__, __LINE__, str_level, ## __VA_ARGS__) @@ -142,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 */ + #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 */ + #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 */ + #define LOG_INFOB(x) /* Nothing */ #endif + #endif /* CFG_LOG_H */