Changeset 7729 in orxonox.OLD for trunk/src/defs
- Timestamp:
- May 19, 2006, 3:07:09 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/defs/debug.h
r7711 r7729 35 35 36 36 // DEFINE ERROR MODES 37 #define NO038 #define ERR 139 #define WARN 240 #define INFO 341 #define DEBUG 442 #define vDEBUG 537 #define ORX_NONE 0 38 #define ORX_ERR 1 39 #define ORX_WARN 2 40 #define ORX_INFO 3 41 #define ORX_DEBUG 4 42 #define ORX_vDEBUG 5 43 43 44 44 extern int verbose; … … 46 46 //definitions 47 47 #ifndef MODULAR_DEBUG 48 #define HARD_DEBUG_LEVEL DEBUG48 #define HARD_DEBUG_LEVEL ORX_DEBUG 49 49 #define SOFT_DEBUG_LEVEL verbose 50 50 #else /* MODULAR_DEBUG */ … … 103 103 /// PRINTF: prints with filename and linenumber /// 104 104 /////////////////////////////////////////////////// 105 #define PRINTF NOPRINTF0106 #define PRINTF ERR PRINTF1107 #define PRINTF WARN PRINTF2108 #define PRINTF INFO PRINTF3109 #define PRINTF DEBUG PRINTF4110 #define PRINTF VDEBUG PRINTF5111 112 #if DEBUG <= 3105 #define PRINTFORX_NONE PRINTF0 106 #define PRINTFORX_ERR PRINTF1 107 #define PRINTFORX_WARN PRINTF2 108 #define PRINTFORX_INFO PRINTF3 109 #define PRINTFORX_DEBUG PRINTF4 110 #define PRINTFORX_VDEBUG PRINTF5 111 112 #if DEBUG_LEVEL <= 3 113 113 #define PRINTF(x) PRINT(x) 114 114 #endif … … 122 122 123 123 #ifndef PRINTF 124 #ifdef DEBUG124 #ifdef ORX_DEBUG 125 125 126 126 #define PRINTF(x) \ 127 127 PRINTF ## x 128 128 129 #if HARD_DEBUG_LEVEL >= ERR129 #if HARD_DEBUG_LEVEL >= ORX_ERR 130 130 #define PRINTF1 \ 131 if (SOFT_DEBUG_LEVEL >= ERR) \131 if (SOFT_DEBUG_LEVEL >= ORX_ERR) \ 132 132 printf("(EE)::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC 133 133 #else 134 #define PRINTF1 if ( NO)135 #endif 136 137 #if HARD_DEBUG_LEVEL >= WARN134 #define PRINTF1 if (ORX_NONE) 135 #endif 136 137 #if HARD_DEBUG_LEVEL >= ORX_WARN 138 138 #define PRINTF2 \ 139 if (SOFT_DEBUG_LEVEL >= WARN) \139 if (SOFT_DEBUG_LEVEL >= ORX_WARN) \ 140 140 printf("(WW)::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC 141 141 142 142 #else 143 #define PRINTF2 if ( NO)144 #endif 145 146 #if HARD_DEBUG_LEVEL >= INFO143 #define PRINTF2 if (ORX_NONE) 144 #endif 145 146 #if HARD_DEBUG_LEVEL >= ORX_INFO 147 147 #define PRINTF3 \ 148 if (SOFT_DEBUG_LEVEL >= INFO) \148 if (SOFT_DEBUG_LEVEL >= ORX_INFO) \ 149 149 printf("(II)::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC 150 150 #else 151 #define PRINTF3 if ( NO)152 #endif 153 154 #if HARD_DEBUG_LEVEL >= DEBUG151 #define PRINTF3 if (ORX_NONE) 152 #endif 153 154 #if HARD_DEBUG_LEVEL >= ORX_DEBUG 155 155 #define PRINTF4 \ 156 if (SOFT_DEBUG_LEVEL >= DEBUG) \156 if (SOFT_DEBUG_LEVEL >= ORX_DEBUG) \ 157 157 printf("(DD)::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC 158 158 #else 159 #define PRINTF4 if ( NO)160 #endif 161 162 #if HARD_DEBUG_LEVEL >= vDEBUG159 #define PRINTF4 if (ORX_NONE) 160 #endif 161 162 #if HARD_DEBUG_LEVEL >= ORX_vDEBUG 163 163 #define PRINTF5 \ 164 if (SOFT_DEBUG_LEVEL >= vDEBUG) \164 if (SOFT_DEBUG_LEVEL >= ORX_vDEBUG) \ 165 165 printf("(VD)::%s:%d:", __FILE__, __LINE__) && PRINT_EXEC 166 166 #else 167 #define PRINTF5 if ( NO)168 #endif 169 170 #else 171 #define PRINTF(x) if ( NO)167 #define PRINTF5 if (ORX_NONE) 168 #endif 169 170 #else 171 #define PRINTF(x) if (ORX_NONE) 172 172 #endif 173 173 … … 179 179 /// PRINT: just prints output as is /// 180 180 /////////////////////////////////////////////////// 181 #define PRINT NOPRINT0182 #define PRINT ERR PRINT1183 #define PRINT WARN PRINT2184 #define PRINT INFO PRINT3185 #define PRINT DEBUG PRINT4186 #define PRINT VDEBUG PRINT5187 188 #ifdef DEBUG 181 #define PRINTORX_NONE PRINT0 182 #define PRINTORX_ERR PRINT1 183 #define PRINTORX_WARN PRINT2 184 #define PRINTORX_INFO PRINT3 185 #define PRINTORX_DEBUG PRINT4 186 #define PRINTORX_vDEBUG PRINT5 187 188 #ifdef DEBUG_LEVEL 189 189 #define PRINT(x) \ 190 190 PRINT ## x 191 191 192 #if HARD_DEBUG_LEVEL >= ERR192 #if HARD_DEBUG_LEVEL >= ORX_ERR 193 193 #define PRINT1 \ 194 if (SOFT_DEBUG_LEVEL >= ERR) \194 if (SOFT_DEBUG_LEVEL >= ORX_ERR) \ 195 195 PRINT_EXEC 196 196 #else 197 #define PRINT1 if ( NO)198 #endif 199 200 #if HARD_DEBUG_LEVEL >= WARN197 #define PRINT1 if (ORX_NONE) 198 #endif 199 200 #if HARD_DEBUG_LEVEL >= ORX_WARN 201 201 #define PRINT2 \ 202 if (SOFT_DEBUG_LEVEL >= WARN) \202 if (SOFT_DEBUG_LEVEL >= ORX_WARN) \ 203 203 PRINT_EXEC 204 204 205 205 #else 206 #define PRINT2 if ( NO)207 #endif 208 209 #if HARD_DEBUG_LEVEL >= INFO206 #define PRINT2 if (ORX_NONE) 207 #endif 208 209 #if HARD_DEBUG_LEVEL >= ORX_INFO 210 210 #define PRINT3 \ 211 if (SOFT_DEBUG_LEVEL >= INFO) \211 if (SOFT_DEBUG_LEVEL >= ORX_INFO) \ 212 212 PRINT_EXEC 213 213 #else 214 #define PRINT3 if ( NO)215 #endif 216 217 #if HARD_DEBUG_LEVEL >= DEBUG214 #define PRINT3 if (ORX_NONE) 215 #endif 216 217 #if HARD_DEBUG_LEVEL >= ORX_DEBUG 218 218 #define PRINT4 \ 219 if (SOFT_DEBUG_LEVEL >= DEBUG) \219 if (SOFT_DEBUG_LEVEL >= ORX_DEBUG) \ 220 220 PRINT_EXEC 221 221 #else 222 #define PRINT4 if ( NO)223 #endif 224 225 #if HARD_DEBUG_LEVEL >= vDEBUG222 #define PRINT4 if (ORX_NONE) 223 #endif 224 225 #if HARD_DEBUG_LEVEL >= ORX_vDEBUG 226 226 #define PRINT5 \ 227 if (SOFT_DEBUG_LEVEL >= vDEBUG) \227 if (SOFT_DEBUG_LEVEL >= ORX_vDEBUG) \ 228 228 PRINT_EXEC 229 229 #else 230 #define PRINT5 if ( NO)231 #endif 232 233 234 #else 235 #define PRINT(x) if ( NO)230 #define PRINT5 if (ORX_NONE) 231 #endif 232 233 234 #else 235 #define PRINT(x) if (ORX_NONE) 236 236 #endif 237 237 … … 244 244 /// COUT: just prints output as is with std::cout /// 245 245 //////////////////////////////////////////////////////// 246 #define COUT NOCOUT0247 #define COUT ERR COUT1248 #define COUT WARN COUT2249 #define COUT INFO COUT3250 #define COUT DEBUG COUT4251 #define COUT VDEBUG COUT5252 253 #ifdef DEBUG 246 #define COUTORX_NONE COUT0 247 #define COUTORX_ERR COUT1 248 #define COUTORX_WARN COUT2 249 #define COUTORX_INFO COUT3 250 #define COUTORX_DEBUG COUT4 251 #define COUTORX_vDEBUG COUT5 252 253 #ifdef DEBUG_LEVEL 254 254 #define COUT(x) \ 255 255 COUT ## x 256 256 257 #if HARD_DEBUG_LEVEL >= ERR257 #if HARD_DEBUG_LEVEL >= ORX_ERR 258 258 #define COUT1 \ 259 if (SOFT_DEBUG_LEVEL >= ERR) \260 COUT_EXEC 261 #else 262 #define COUT1 if ( NO)\263 COUT_EXEC 264 #endif 265 266 #if HARD_DEBUG_LEVEL >= WARN259 if (SOFT_DEBUG_LEVEL >= ORX_ERR) \ 260 COUT_EXEC 261 #else 262 #define COUT1 if (ORX_NONE)\ 263 COUT_EXEC 264 #endif 265 266 #if HARD_DEBUG_LEVEL >= ORX_WARN 267 267 #define COUT2 \ 268 if (SOFT_DEBUG_LEVEL >= WARN) \269 COUT_EXEC 270 271 #else 272 #define COUT2 if ( NO) \273 COUT_EXEC 274 #endif 275 276 #if HARD_DEBUG_LEVEL >= INFO268 if (SOFT_DEBUG_LEVEL >= ORX_WARN) \ 269 COUT_EXEC 270 271 #else 272 #define COUT2 if (ORX_NONE) \ 273 COUT_EXEC 274 #endif 275 276 #if HARD_DEBUG_LEVEL >= ORX_INFO 277 277 #define COUT3 \ 278 if (SOFT_DEBUG_LEVEL >= INFO) \279 COUT_EXEC 280 #else 281 #define COUT3 if ( NO) \282 COUT_EXEC 283 #endif 284 285 #if HARD_DEBUG_LEVEL >= DEBUG278 if (SOFT_DEBUG_LEVEL >= ORX_INFO) \ 279 COUT_EXEC 280 #else 281 #define COUT3 if (ORX_NONE) \ 282 COUT_EXEC 283 #endif 284 285 #if HARD_DEBUG_LEVEL >= ORX_DEBUG 286 286 #define COUT4 \ 287 if (SOFT_DEBUG_LEVEL >= DEBUG) \288 COUT_EXEC 289 #else 290 #define COUT4 if ( NO) \291 COUT_EXEC 292 #endif 293 294 #if HARD_DEBUG_LEVEL >= vDEBUG287 if (SOFT_DEBUG_LEVEL >= ORX_DEBUG) \ 288 COUT_EXEC 289 #else 290 #define COUT4 if (ORX_NONE) \ 291 COUT_EXEC 292 #endif 293 294 #if HARD_DEBUG_LEVEL >= ORX_vDEBUG 295 295 #define COUT5 \ 296 if (SOFT_DEBUG_LEVEL >= vDEBUG) \296 if (SOFT_DEBUG_LEVEL >= ORX_vDEBUG) \ 297 297 COUT_EXEC 298 298 #else 299 #define COUT5 if ( NO) \300 COUT_EXEC 301 #endif 302 303 304 #else 305 #define COUT(x) if ( NO) \299 #define COUT5 if (ORX_NONE) \ 300 COUT_EXEC 301 #endif 302 303 304 #else 305 #define COUT(x) if (ORX_NONE) \ 306 306 COUT_EXEC 307 307 #endif
Note: See TracChangeset
for help on using the changeset viewer.