From 989b9495c6d8aa40bdf7e45eeb3a37521f2122cb Mon Sep 17 00:00:00 2001 From: Gatsby Van Date: Wed, 24 Jan 2024 10:52:28 +0800 Subject: [PATCH] better print. --- df_datalink_ge/src/include/common.h | 12 ++++++------ df_datalink_sp/src/include/common.h | 15 +++++++-------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/df_datalink_ge/src/include/common.h b/df_datalink_ge/src/include/common.h index b5edcc2..c80a447 100644 --- a/df_datalink_ge/src/include/common.h +++ b/df_datalink_ge/src/include/common.h @@ -40,24 +40,24 @@ /* Stringify */ #define STR(x) #x -// #define _814_DEBUG_LEVEL 3 +// #define _DEBUG_LEVEL 3 -#if _814_DEBUG_LEVEL > 0 +#if _DEBUG_LEVEL > 0 #define DBG_PRINT(...) printf(__VA_ARGS__) #endif -#if _814_DEBUG_LEVEL >= 1 +#if _DEBUG_LEVEL >= 1 #define DBG_ERROR(...) __PRINT_BLOCK( \ printf("in"__FILE__ \ - " #%4d [error]\t", \ + ":%d [error]\t", \ __LINE__); \ printf(__VA_ARGS__);) #endif -#if _814_DEBUG_LEVEL >= 2 +#if _DEBUG_LEVEL >= 2 #define DBG_WARNING(...) __PRINT_BLOCK( \ printf("[warning]\t"); \ printf(__VA_ARGS__);) #endif -#if _814_DEBUG_LEVEL >= 3 +#if _DEBUG_LEVEL >= 3 #define DBG_INFO(...) __PRINT_BLOCK( \ printf("[Info]\t"); \ printf(__VA_ARGS__);) diff --git a/df_datalink_sp/src/include/common.h b/df_datalink_sp/src/include/common.h index b5edcc2..460b552 100644 --- a/df_datalink_sp/src/include/common.h +++ b/df_datalink_sp/src/include/common.h @@ -24,7 +24,6 @@ #include #include "util.h" #include "error.h" -#include "../config/app_config.h" /************************** Constant Definitions *****************************/ /***************** Macros (Inline Functions) Definitions *********************/ @@ -40,24 +39,24 @@ /* Stringify */ #define STR(x) #x -// #define _814_DEBUG_LEVEL 3 +// #define _DEBUG_LEVEL 3 -#if _814_DEBUG_LEVEL > 0 +#if _DEBUG_LEVEL > 0 #define DBG_PRINT(...) printf(__VA_ARGS__) #endif -#if _814_DEBUG_LEVEL >= 1 +#if _DEBUG_LEVEL >= 1 #define DBG_ERROR(...) __PRINT_BLOCK( \ - printf("in"__FILE__ \ - " #%4d [error]\t", \ + printf("in "__FILE__ \ + ":%d [error]\t", \ __LINE__); \ printf(__VA_ARGS__);) #endif -#if _814_DEBUG_LEVEL >= 2 +#if _DEBUG_LEVEL >= 2 #define DBG_WARNING(...) __PRINT_BLOCK( \ printf("[warning]\t"); \ printf(__VA_ARGS__);) #endif -#if _814_DEBUG_LEVEL >= 3 +#if _DEBUG_LEVEL >= 3 #define DBG_INFO(...) __PRINT_BLOCK( \ printf("[Info]\t"); \ printf(__VA_ARGS__);)