X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcfg%2Flog.h;h=91ff066d834895ce8aa5671fee1671ad3369c690;hb=4cc44c9888a0336b9d01121ec0b7ad95f4a76195;hp=063f16252fddc01c2d917d86f93030c4450813a8;hpb=bae32100e6d844c07afdbfcddb616f508fb1b978;p=bertos.git diff --git a/bertos/cfg/log.h b/bertos/cfg/log.h index 063f1625..91ff066d 100644 --- a/bertos/cfg/log.h +++ b/bertos/cfg/log.h @@ -35,9 +35,9 @@ * This module implement a simple interface to use the multi level logging system. * The log message have the priority order, like this: * - * - error message (most hight) - * - warning message - * - info message (most low) + * - error message (most hight) + * - warning message + * - info message (most low) * * With this priority system we can log only the message that have egual or major * priority than log level that you has been configurate. Further you can have a @@ -50,41 +50,41 @@ * To use logging system you should include this module in your drive and use * a LOG_ERROR, LOG_WARNING and LOG_INFO macros to set the level log of the message. * Then you should define a LOG_LEVEL and LOG_VERBOSE costant in your - * cfg/cfg_.h using the follow police: + * \c cfg/cfg_\.h using the follow policy: * - * - in your file cfg/cfg_.h, you define the logging + * - in your file \c cfg/cfg_\.h, you define the logging * level and verbosity mode for your specific module: * * \code * - * ** + * ** * * Logging level definition. * * * * Use 0 to log only the error messages * * Use 1 to log the error and warning messages * * Use 2 to log all messages * * - * #define _LOG_LEVEL 2 + * #define _LOG_LEVEL 2 * * ** * * Set logging verbosity. * * * * If verbose is zero print short log messages. * * - * #define _LOG_VERBOSE 1 + * #define _LOG_VERBOSE 1 * * \endcode * * - then, in the module that you use a logging macros you should define * a LOG_LEVEL and LOG_VERBOSE using the previous value that you have define - * in cfg_.h header. After this you should include the cfg/log.h + * in cfg_.h header. After this you should include the cfg/log.h * module: * * \code * * // Define logging setting (for cfg/log.h module). - * #define LOG_LEVEL _LOG_LEVEL - * #define LOG_VERBOSE _LOG_VERBOSE + * #define LOG_LEVEL _LOG_LEVEL + * #define LOG_VERBOSE _LOG_VERBOSE * #include * * \endcode @@ -93,8 +93,8 @@ * macros, the module use the default setting (see below). * * WARNING: when use the log.h module, and you want to set a your log level - * make sure to include this module after a cfg_.h, because the - * LOG_LEVEL and LOG_VERBOSE macros must be define before to include log module, + * make sure to include this module after a \c cfg_.h, because the + * LOG_LEVEL and LOG_VERBOSE macros must be defined before to include log module, * otherwise the log module use a default settings. * * \version $Id$ @@ -162,15 +162,15 @@ */ #define LOG_ERR(str,...) LOG_PRINT("ERR", str, ## __VA_ARGS__) -#if (LOG_LEVEL <= LOG_LVL_INFO) +#if (LOG_LEVEL == LOG_LVL_INFO) #define LOG_WARN(str,...) LOG_PRINT("WARN", str, ## __VA_ARGS__) #define LOG_INFO(str,...) LOG_PRINT("INFO", str, ## __VA_ARGS__) -#elif (LOG_LEVEL <= LOG_LVL_WARN) +#elif (LOG_LEVEL == LOG_LVL_WARN) #define LOG_WARN(str,...) LOG_PRINT("WARN", str, ## __VA_ARGS__) #define LOG_INFO(str,...) /* Nothing */ -#else /* LOG_LEVEL <= LOG_LVL_ERR */ +#else /* LOG_LEVEL == LOG_LVL_ERR */ #define LOG_WARN(str,...) /* Nothing */ #define LOG_INFO(str,...) /* Nothing */