Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3590 in orxonox.OLD for orxonox/trunk/src/defs


Ignore:
Timestamp:
Mar 17, 2005, 1:06:51 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: updated debug.h: now possibility to log per module (compile-time)

  1. write in the cc-file at the beginnig !!BEFORE ANY INCLUDES!!

#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_[MODULENAME]
where [MODULNAME] is a name of a module that can be defined in debug.h

  1. define a new MODULE: easy just write a new one under the other ones in DEBUG.h
  1. if you do not wish special loggin everything stays as is, and you do not have to worry. (then de verbose will be set from orxonox.cc: int verbose)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/defs/debug.h

    r3548 r3590  
    2222#define _DEBUG_H
    2323
     24#if HAVE_CONFIG_H
     25#include <config.h>
     26#endif
     27
     28#include <stdio.h>
     29
     30// DEFINE ERROR MODES
    2431#define NO              0
    2532#define ERR             1
     
    2936#define vDEBUGING       5
    3037
    31 #if HAVE_CONFIG_H
    32 #include <config.h>
    33 #endif
    34 
    35 #include <stdio.h>
    36 
     38#ifndef DEBUG_SPECIAL_MODULE
     39extern int verbose;
     40#else
     41// DEFINE MODULES
     42#define DEBUG_MODULE_WORLD              0
     43#define DEBUG_MODULE_PNODE              0
     44#define DEBUG_MODULE_TRACKMANAGER       0
     45#define DEBUG_MODULE_LIGHT              0
     46#define DEBUG_MODULE_WORLD_ENTITY       0
     47#define DEBUG_MODULE_PLAYER             0
     48#define DEBUG_MODULE_PNODE              0
     49#define DEBUG_MODULE_IMPORTER           0
     50#define DEBUG_MODULE_MATH               0
     51
     52#define verbose DEBUG_SPECIAL_MODULE
     53
     54#endif
    3755///////////////////////////////////////////////////
    3856/// PRINTF: prints with filename and linenumber ///
     
    4058
    4159#ifdef DEBUG
    42 extern int verbose;
     60
    4361#define PRINTF(x) \
    4462           PRINTF ## x
     
    97115///////////////////////////////////////////////////
    98116#ifdef  DEBUG
    99 extern int verbose;
    100117#define PRINT(x) \
    101118  PRINT ## x
Note: See TracChangeset for help on using the changeset viewer.