diff options
| author | armink <[email protected]> | 2019-04-12 10:18:57 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2019-04-12 10:18:57 +0800 |
| commit | fa4d4ab7cf774ccb701d01a6fd1371ce8d9474e9 (patch) | |
| tree | 89cb48115a065516808cc8b0d6402b9924e06c4c /components/utilities | |
| parent | 35bb75b96bb793e12b267cf987a2bf47f34d6510 (diff) | |
Update all of debug log definition to DBG_TAG and DBG_LVL.
Diffstat (limited to 'components/utilities')
| -rw-r--r-- | components/utilities/ulog/ulog_def.h | 8 | ||||
| -rw-r--r-- | components/utilities/utest/utest.c | 10 | ||||
| -rw-r--r-- | components/utilities/utest/utest_log.h | 10 |
3 files changed, 16 insertions, 12 deletions
diff --git a/components/utilities/ulog/ulog_def.h b/components/utilities/ulog/ulog_def.h index 40b39de972..de5e82fcc5 100644 --- a/components/utilities/ulog/ulog_def.h +++ b/components/utilities/ulog/ulog_def.h @@ -54,7 +54,9 @@ extern "C" { #if !defined(LOG_TAG) /* compatible for rtdbg */ - #if defined(DBG_SECTION_NAME) + #if defined(DBG_TAG) + #define LOG_TAG DBG_TAG + #elif defined(DBG_SECTION_NAME) #define LOG_TAG DBG_SECTION_NAME #else #define LOG_TAG "NO_TAG" @@ -63,7 +65,9 @@ extern "C" { #if !defined(LOG_LVL) /* compatible for rtdbg */ - #if defined(DBG_LEVEL) + #if defined(DBG_LVL) + #define LOG_LVL DBG_LVL + #elif defined(DBG_LEVEL) #define LOG_LVL DBG_LEVEL #else #define LOG_LVL LOG_LVL_DBG diff --git a/components/utilities/utest/utest.c b/components/utilities/utest/utest.c index 99775ab09f..f59f97bb64 100644 --- a/components/utilities/utest/utest.c +++ b/components/utilities/utest/utest.c @@ -15,14 +15,14 @@ #include "utest.h" #include <utest_log.h> -#undef DBG_SECTION_NAME -#undef DBG_LEVEL +#undef DBG_TAG +#undef DBG_LVL -#define DBG_SECTION_NAME "utest" +#define DBG_TAG "utest" #ifdef UTEST_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO +#define DBG_LVL DBG_INFO #endif #include <rtdbg.h> diff --git a/components/utilities/utest/utest_log.h b/components/utilities/utest/utest_log.h index c4bd25a80b..0403268351 100644 --- a/components/utilities/utest/utest_log.h +++ b/components/utilities/utest/utest_log.h @@ -15,14 +15,14 @@ #define UTEST_DEBUG -#undef DBG_SECTION_NAME -#undef DBG_LEVEL +#undef DBG_TAG +#undef DBG_LVL -#define DBG_SECTION_NAME "testcase" +#define DBG_TAG "testcase" #ifdef UTEST_DEBUG -#define DBG_LEVEL DBG_LOG +#define DBG_LVL DBG_LOG #else -#define DBG_LEVEL DBG_INFO +#define DBG_LVL DBG_INFO #endif #include <rtdbg.h> |
