Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 27, 2007, 4:58:52 PM (16 years ago)
Author:
landauf
Message:

introduced 3 different soft debug levels: one for each output device (console, logfile, ingame-shell (to come))
all are configurable in the config file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/core/Debug.h

    r684 r699  
    6868
    6969#define PRINT_EXEC  printf
    70 //#define COUT_EXEC   std::cout
    71 #define COUT_EXEC   orxonox::OutputHandler::getOutStream()
     70#define COUT_EXEC(x) \
     71  orxonox::OutputHandler::getOutStream().setOutputLevel(x)
    7272
    7373#ifndef PRINTF
     
    207207   #define COUT1  \
    208208    if (getSoftDebugLevel() >= ORX_ERROR)  \
    209      COUT_EXEC
     209     COUT_EXEC(1)
    210210  #else
    211211   #define COUT1 if (ORX_NONE)\
    212     COUT_EXEC
     212    COUT_EXEC(1)
    213213  #endif
    214214
     
    216216   #define COUT2 \
    217217    if (getSoftDebugLevel() >= ORX_WARNING) \
    218      COUT_EXEC
     218     COUT_EXEC(2)
    219219  #else
    220220   #define COUT2 if (ORX_NONE) \
    221     COUT_EXEC
     221    COUT_EXEC(2)
    222222  #endif
    223223
     
    225225   #define COUT3 \
    226226    if (getSoftDebugLevel() >= ORX_INFO) \
    227      COUT_EXEC
     227     COUT_EXEC(3)
    228228  #else
    229229   #define COUT3 if (ORX_NONE) \
    230     COUT_EXEC
     230    COUT_EXEC(3)
    231231  #endif
    232232
     
    234234   #define COUT4 \
    235235    if (getSoftDebugLevel() >= ORX_DEBUG) \
    236      COUT_EXEC
     236     COUT_EXEC(4)
    237237  #else
    238238   #define COUT4 if (ORX_NONE) \
    239     COUT_EXEC
     239    COUT_EXEC(4)
    240240  #endif
    241241
     
    243243   #define COUT5 \
    244244    if (getSoftDebugLevel() >= ORX_vDEBUG) \
    245      COUT_EXEC
     245     COUT_EXEC(5)
    246246  #else
    247247   #define COUT5 if (ORX_NONE) \
    248     COUT_EXEC
     248    COUT_EXEC(5)
    249249  #endif
    250250
    251251 #else /* if ORX_PRINT_DEBUG_OUTPUT */
    252252  #define COUT(x) if (ORX_NONE) \
    253    COUT_EXEC
     253   COUT_EXEC(5)
    254254 #endif /* if ORX_PRINT_DEBUG_OUTPUT */
    255255
    256256 #define COUT0 \
    257   COUT_EXEC
     257  COUT_EXEC(0)
    258258#endif /* ifndef COUT */
    259259
Note: See TracChangeset for help on using the changeset viewer.