From 1ad117497cecce4aab4b18ddf4a8fb51aedcaffc Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Thu, 13 Oct 2022 14:39:32 +0800 Subject: [PATCH] more format --- source/client/inc/clientLog.h | 56 +++++++---------------------------- 1 file changed, 10 insertions(+), 46 deletions(-) diff --git a/source/client/inc/clientLog.h b/source/client/inc/clientLog.h index 43574379af..541717c7eb 100644 --- a/source/client/inc/clientLog.h +++ b/source/client/inc/clientLog.h @@ -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 }