Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 10, 2007, 5:07:46 PM (16 years ago)
Author:
landauf
Message:

added benschs Debug.h from orxonox_v1

include Debug.h or CoreIncludes.h and use it in the following way:
COUT(int) << bla;
PRINT(int)(bla);
PRINTF(int)(bla);

where 'bla' is the same as if you would use the normal std::cout or printf function
and 'int' is a value between 0 and 5:
0 = no debug output
1 = errors
2 = warnings
3 = info
4 = debug
5 = more debug

so to print a warning, use int = 2
for some unimportant debug information, use int = 4
and so on…

the level of the output is configured in the Debug.h file (later i'll add an entry to the config-file for the soft-level).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/core/CoreIncludes.h

    r450 r453  
    1717#include "OrxonoxClass.h"
    1818#include "ConfigValueContainer.h"
     19#include "Debug.h"
    1920
    2021#include "OgreVector2.h"
     
    5657    @param ClassName The name of the class
    5758*/
    58 #if HIERARCHY_VERBOSE
    5959#define RegisterObject(ClassName) \
    60     std::cout << "*** Register Object: " << #ClassName << "\n"; \
     60    COUT(4) << "*** Register Object: " << #ClassName << "\n"; \
    6161    InternRegisterObject(ClassName, false)
    62 #else
    63 #define RegisterObject(ClassName) \
    64     InternRegisterObject(ClassName, false)
    65 #endif
    6662
    6763/**
     
    6965    @param ClassName The name of the class
    7066*/
    71 #if HIERARCHY_VERBOSE
    7267#define RegisterRootObject(ClassName) \
    73     std::cout << "*** Register Root-Object: " << #ClassName << "\n"; \
     68    COUT(4) << "*** Register Root-Object: " << #ClassName << "\n"; \
    7469    InternRegisterRootObject(ClassName)
    75 #else
    76 #define RegisterRootObject(ClassName) \
    77     InternRegisterRootObject(ClassName)
    78 #endif
    7970
    8071/**
Note: See TracChangeset for help on using the changeset viewer.