diff options
author | ZoRo <dos21h@gmail.com> | 2017-01-26 22:23:28 +0000 |
---|---|---|
committer | ZoRo <dos21h@gmail.com> | 2017-01-26 22:23:28 +0000 |
commit | 67860598185d248756316549a7522968f7294990 (patch) | |
tree | b329576eca4f5dccbfec2bf7a4952abc93b8b9c8 /debug.h | |
parent | a588aa017512d3cc70dde6627d1218020e755259 (diff) | |
download | agni-67860598185d248756316549a7522968f7294990.tar.gz agni-67860598185d248756316549a7522968f7294990.zip |
Made working basic mq IPC communication
Diffstat (limited to 'debug.h')
-rw-r--r-- | debug.h | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -19,6 +19,12 @@ #define E_COLOR "1;31m" #define E_COLOR_S "\033[" E_COLOR #define E_COLOR_E "\033[0m" + #define W_COLOR "1;35m" + #define W_COLOR_S "\033[" W_COLOR + #define W_COLOR_E "\033[0m" + #define PE_COLOR "1;33m" + #define PE_COLOR_S "\033[" PE_COLOR + #define PE_COLOR_E "\033[0m" #else #define D_COLOR #define D_COLOR_S @@ -26,6 +32,12 @@ #define E_COLOR #define E_COLOR_S #define E_COLOR_E + #define W_COLOR + #define W_COLOR_S + #define W_COLOR_E + #define PE_COLOR + #define PE_COLOR_S + #define PE_COLOR_E #endif //print debug line @@ -49,8 +61,12 @@ //print debug string #ifdef PRINT_DEBUG #define PRINT_DEBUG_F "Debug: " + #define PRINT_WARNING_F "WARN: " + #define PRINT_PERROR_F "PRME: " #else #define PRINT_DEBUG_F "" + #define PRINT_WARNING_F "" + #define PRINT_PERROR_F "" #endif #define PRINT( format, args ... ) PRINTF( D_COLOR_S PRINT_DEBUG_F \ @@ -61,9 +77,23 @@ PRINT_FILE_F PRINT_LINE_F format E_COLOR_E, PRINT_FILE_D, \ PRINT_LINE_D, ##args); +#define WARNING( format, args ... ) PRINTF( W_COLOR_S PRINT_WARNING_F \ + PRINT_FILE_F PRINT_LINE_F format W_COLOR_E, PRINT_FILE_D, \ + PRINT_LINE_D, ##args); + +#define PERROR( format, args ... ) PRINTF( PE_COLOR_S PRINT_WARNING_F \ + PRINT_FILE_F PRINT_LINE_F format PE_COLOR_E, PRINT_FILE_D, \ + PRINT_LINE_D, ##args); + #define PNL() PRINT("\n"); #define ENL() ERROR("\n"); +#define WRN() WARNING("\n"); + +#define PERM() PERROR("\n"); + +/*ERROR LEVEL TYPES*/ + #endif |