Move log macros to log module and refactor if. Fix comments.
[bertos.git] / bertos / cfg / debug.h
index 2fbedc51c5e999208b9416a9fdd21df7186d436d..dde6af5e50f4dfb0df6047ec7fe3fa8422d5868d 100644 (file)
                #define TRACEMSG(...)  do {} while(0)
        #endif
 
-       /**
-        * Multi level logging system.
-        *
-        * You can use these macro directy or using the cfg/log.h module
-        * that provide a simple interface for using the logging multilevel system.
-        * The priority level is order form error messages (hight priority) to info messages
-        * (low priority), so if you choose a low level log message you can see also all message
-        * that have a hight priority.
-        *
-        * \{
-        */
-       /// Logging level definition
-       #define DBG_LOG_ERROR     0
-       #define DBG_LOG_WARNING   1
-       #define DBG_LOG_INFO      2
-
-       /// Logging verbose mode
-       #define DBG_LOG_VERBOSE   1
-       #define DBG_LOG_SILENT    0
-
-       #define DBG_ERROR(debug_level, mode, str,...) \
-       do { \
-                       if(debug_level >= DBG_LOG_ERROR) \
-                       { \
-                               if (mode == DBG_LOG_VERBOSE)\
-                                       kprintf("Error(%s():%d): "str, __func__, __LINE__, ## __VA_ARGS__); \
-                               else \
-                                       kprintf("Error: "str,  ## __VA_ARGS__); \
-                       } \
-                       else \
-                       { \
-                               /* NONE */ \
-                       } \
-       } while (0)
-
-       #define DBG_WARNING(debug_level, mode, str,...) \
-       do { \
-                       if(debug_level >= DBG_LOG_WARNING) \
-                       { \
-                               if (mode == DBG_LOG_VERBOSE) \
-                                       kprintf("Warning(%s():%d): "str, __func__, __LINE__, ## __VA_ARGS__); \
-                               else \
-                                       kprintf("Warning: "str,  ## __VA_ARGS__); \
-                       } \
-                       else \
-                       { \
-                               /* NONE */ \
-                       } \
-       } while (0)
-
-       #define DBG_INFO(debug_level, mode, str,...) \
-       do { \
-                       if(debug_level >= DBG_LOG_INFO) \
-                       { \
-                               if (mode == DBG_LOG_VERBOSE) \
-                                       kprintf("Info(%s():%d): "str, __func__, __LINE__, ## __VA_ARGS__); \
-                               else \
-                                       kprintf("Info: "str,  ## __VA_ARGS__); \
-                       } \
-                       else \
-                       { \
-                               /* NONE */ \
-                       } \
-       } while (0)
-       /* \} */
 
        /**
         * \name Walls to detect data corruption