Changeset 560 for code/branches/FICN/src/orxonox/core/Debug.h
- Timestamp:
- Dec 17, 2007, 3:20:46 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/core/Debug.h
r499 r560 25 25 26 26 #include <stdio.h> 27 28 int getSoftDebugLevel(); 27 29 28 30 // DEFINE ERROR MODES … … 38 40 39 41 #define ORX_HARD_DEBUG_LEVEL ORX_DEBUG 40 #define ORX_SOFT_DEBUG_LEVEL ORX_WARNING // <-- fix that! should be a configurable setting42 //#define ORX_SOFT_DEBUG_LEVEL ORX_WARNING // <-- fix that! should be a configurable setting 41 43 42 44 /////////////////////////////////////////////////// … … 61 63 #if ORX_HARD_DEBUG_LEVEL >= ORX_ERROR 62 64 #define PRINTF1 \ 63 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_ERROR) \65 if (getSoftDebugLevel() >= ORX_ERROR) \ 64 66 printf("Error (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC 65 67 #else … … 69 71 #if ORX_HARD_DEBUG_LEVEL >= ORX_WARNING 70 72 #define PRINTF2 \ 71 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_WARNING) \73 if (getSoftDebugLevel() >= ORX_WARNING) \ 72 74 printf("Warning (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC 73 75 #else … … 77 79 #if ORX_HARD_DEBUG_LEVEL >= ORX_INFO 78 80 #define PRINTF3 \ 79 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_INFO) \81 if (getSoftDebugLevel() >= ORX_INFO) \ 80 82 printf("Info (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC 81 83 #else … … 85 87 #if ORX_HARD_DEBUG_LEVEL >= ORX_DEBUG 86 88 #define PRINTF4 \ 87 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_DEBUG) \89 if (getSoftDebugLevel() >= ORX_DEBUG) \ 88 90 printf("Debug (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC 89 91 #else … … 93 95 #if ORX_HARD_DEBUG_LEVEL >= ORX_vDEBUG 94 96 #define PRINTF5 \ 95 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_vDEBUG) \97 if (getSoftDebugLevel() >= ORX_vDEBUG) \ 96 98 printf("vDebug (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC 97 99 #else … … 124 126 #if ORX_HARD_DEBUG_LEVEL >= ORX_ERROR 125 127 #define PRINT1 \ 126 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_ERROR) \128 if (getSoftDebugLevel() >= ORX_ERROR) \ 127 129 PRINT_EXEC 128 130 #else … … 132 134 #if ORX_HARD_DEBUG_LEVEL >= ORX_WARNING 133 135 #define PRINT2 \ 134 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_WARNING) \136 if (getSoftDebugLevel() >= ORX_WARNING) \ 135 137 PRINT_EXEC 136 138 #else … … 140 142 #if ORX_HARD_DEBUG_LEVEL >= ORX_INFO 141 143 #define PRINT3 \ 142 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_INFO) \144 if (getSoftDebugLevel() >= ORX_INFO) \ 143 145 PRINT_EXEC 144 146 #else … … 148 150 #if ORX_HARD_DEBUG_LEVEL >= ORX_DEBUG 149 151 #define PRINT4 \ 150 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_DEBUG) \152 if (getSoftDebugLevel() >= ORX_DEBUG) \ 151 153 PRINT_EXEC 152 154 #else … … 156 158 #if ORX_HARD_DEBUG_LEVEL >= ORX_vDEBUG 157 159 #define PRINT5 \ 158 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_vDEBUG) \160 if (getSoftDebugLevel() >= ORX_vDEBUG) \ 159 161 PRINT_EXEC 160 162 #else … … 188 190 #if ORX_HARD_DEBUG_LEVEL >= ORX_ERROR 189 191 #define COUT1 \ 190 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_ERROR) \192 if (getSoftDebugLevel() >= ORX_ERROR) \ 191 193 COUT_EXEC 192 194 #else … … 197 199 #if ORX_HARD_DEBUG_LEVEL >= ORX_WARNING 198 200 #define COUT2 \ 199 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_WARNING) \201 if (getSoftDebugLevel() >= ORX_WARNING) \ 200 202 COUT_EXEC 201 203 #else … … 206 208 #if ORX_HARD_DEBUG_LEVEL >= ORX_INFO 207 209 #define COUT3 \ 208 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_INFO) \210 if (getSoftDebugLevel() >= ORX_INFO) \ 209 211 COUT_EXEC 210 212 #else … … 215 217 #if ORX_HARD_DEBUG_LEVEL >= ORX_DEBUG 216 218 #define COUT4 \ 217 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_DEBUG) \219 if (getSoftDebugLevel() >= ORX_DEBUG) \ 218 220 COUT_EXEC 219 221 #else … … 224 226 #if ORX_HARD_DEBUG_LEVEL >= ORX_vDEBUG 225 227 #define COUT5 \ 226 if ( ORX_SOFT_DEBUG_LEVEL>= ORX_vDEBUG) \228 if (getSoftDebugLevel() >= ORX_vDEBUG) \ 227 229 COUT_EXEC 228 230 #else
Note: See TracChangeset
for help on using the changeset viewer.