more format

This commit is contained in:
Hongze Cheng 2022-10-13 14:39:32 +08:00
parent 17040610e5
commit 1ad117497c
1 changed files with 10 additions and 46 deletions

View File

@ -22,52 +22,16 @@ extern "C" {
#include "tlog.h"
#define tscFatal(...) \
do { \
if (cDebugFlag & DEBUG_FATAL) { \
taosPrintLog("TSC FATAL ", DEBUG_FATAL, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscError(...) \
do { \
if (cDebugFlag & DEBUG_ERROR) { \
taosPrintLog("TSC ERROR ", DEBUG_ERROR, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscWarn(...) \
do { \
if (cDebugFlag & DEBUG_WARN) { \
taosPrintLog("TSC WARN ", DEBUG_WARN, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscInfo(...) \
do { \
if (cDebugFlag & DEBUG_INFO) { \
taosPrintLog("TSC ", DEBUG_INFO, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscDebug(...) \
do { \
if (cDebugFlag & DEBUG_DEBUG) { \
taosPrintLog("TSC ", DEBUG_DEBUG, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscTrace(...) \
do { \
if (cDebugFlag & DEBUG_TRACE) { \
taosPrintLog("TSC ", DEBUG_TRACE, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscDebugL(...) \
do { \
if (cDebugFlag & DEBUG_DEBUG) { \
taosPrintLongString("TSC ", DEBUG_DEBUG, cDebugFlag, __VA_ARGS__); \
} \
} while (0)
#define tscPerf(...) \
do { \
taosPrintLog("TSC ", 0, cDebugFlag, __VA_ARGS__); \
} while (0)
// clang-format off
#define tscFatal(...) do { if (cDebugFlag & DEBUG_FATAL) { taosPrintLog("TSC FATAL ", DEBUG_FATAL, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscError(...) do { if (cDebugFlag & DEBUG_ERROR) { taosPrintLog("TSC ERROR ", DEBUG_ERROR, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscWarn(...) do { if (cDebugFlag & DEBUG_WARN) { taosPrintLog("TSC WARN ", DEBUG_WARN, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscInfo(...) do { if (cDebugFlag & DEBUG_INFO) { taosPrintLog("TSC ", DEBUG_INFO, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscDebug(...) do { if (cDebugFlag & DEBUG_DEBUG) { taosPrintLog("TSC ", DEBUG_DEBUG, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscTrace(...) do { if (cDebugFlag & DEBUG_TRACE) { taosPrintLog("TSC ", DEBUG_TRACE, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscDebugL(...) do { if (cDebugFlag & DEBUG_DEBUG) { taosPrintLongString("TSC ", DEBUG_DEBUG, cDebugFlag, __VA_ARGS__); }} while(0)
#define tscPerf(...) do { taosPrintLog("TSC ", 0, cDebugFlag, __VA_ARGS__); } while(0)
// clang-format on
#ifdef __cplusplus
}