Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3592 in orxonox.OLD


Ignore:
Timestamp:
Mar 17, 2005, 3:33:58 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: debug.h: now ability to choose between modular and not modular in configure through —disable-modular-debug. Also made it more runtime-proove. so now you have to set the mode in orxonox.cc too.

Location:
orxonox/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/config.h.in

    r3460 r3592  
    8989#undef HAVE__BOOL
    9090
     91/* if Modular-DUBUG mode is enabled */
     92#undef MODULAR_DEBUG
     93
    9194/* Name of package */
    9295#undef PACKAGE
  • orxonox/trunk/configure

    r3569 r3592  
    867867  --enable-debug          compiles in debug mode. Lots of debug info about the
    868868                          game.
     869  --disable-modular-debug compiles in modular-debug mode, that logs
     870                          differently on the many modules of orxonox.
    869871  --enable-sub-projects   also builds the subProjects while make from srcdir
    870872  --enable-documentation  also builds the sDocumentation while make from
     
    38623864if test x$DEBUG = xno; then
    38633865        echo "no"
    3864         echo " -> Setting debuglevel to 3. (orxonox is still in Development. It really is needed."
    3865         DEBUG=3
     3866        echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed."
     3867        DEBUG=4
    38663868elif test x$DEBUG = xyes; then
    38673869        echo "yes"
     
    38783880
    38793881
     3882
     3883#---------------#
     3884# Modular Debug #
     3885#---------------#
     3886MODULAR_DEBUG=yes
     3887echo "$as_me:$LINENO: checking if Modular-DEBUG-mode should be ebabled" >&5
     3888echo $ECHO_N "checking if Modular-DEBUG-mode should be ebabled... $ECHO_C" >&6
     3889# Check whether --enable-modular-debug or --disable-modular-debug was given.
     3890if test "${enable_modular_debug+set}" = set; then
     3891  enableval="$enable_modular_debug"
     3892  MODULAR_DEBUG=$enableval
     3893fi;
     3894
     3895if test x$MODULAR_DEBUG = xno; then
     3896        echo "no"
     3897elif test x$MODULAR_DEBUG = xyes; then
     3898        echo "yes"
     3899
     3900cat >>confdefs.h <<_ACEOF
     3901#define MODULAR_DEBUG 1
     3902_ACEOF
     3903
     3904fi
    38803905
    38813906#--------------#
  • orxonox/trunk/configure.ac

    r3569 r3592  
    5656if test x$DEBUG = xno; then
    5757        echo "no"
    58         echo " -> Setting debuglevel to 3. (orxonox is still in Development. It really is needed."
    59         DEBUG=3
     58        echo " -> Setting debuglevel to 4. (orxonox is still in Development. It really is needed."
     59        DEBUG=4
    6060elif test x$DEBUG = xyes; then
    6161        echo "yes"
     
    6868
    6969AC_SUBST(DEBUG)
     70
     71#---------------#
     72# Modular Debug #
     73#---------------#
     74MODULAR_DEBUG=yes
     75AC_MSG_CHECKING([if Modular-DEBUG-mode should be ebabled])
     76AC_ARG_ENABLE([modular-debug],
     77        AC_HELP_STRING( [--disable-modular-debug], [compiles in modular-debug mode, that logs differently on the many modules of orxonox.]),
     78         MODULAR_DEBUG=$enableval)
     79
     80if test x$MODULAR_DEBUG = xno; then
     81        echo "no"
     82elif test x$MODULAR_DEBUG = xyes; then
     83        echo "yes"
     84        AC_DEFINE_UNQUOTED(MODULAR_DEBUG, 1, [if Modular-DUBUG mode is enabled])
     85fi
    7086
    7187#--------------#
  • orxonox/trunk/src/defs/debug.h

    r3591 r3592  
    3636#define vDEBUGING       5
    3737
     38extern int verbose;
     39
     40#ifndef MODULAR_DEBUG
     41#define HARD_DEBUG_LEVEL DEBUG
     42#else /* MODULAR_DEBUG */
    3843#ifndef DEBUG_SPECIAL_MODULE
    39 extern int verbose;
    40 #else
     44#define HARD_DEBUG_LEVEL DEBUG
     45#else /* DEBUG_SPECIAL_MODULE */
    4146// DEFINE MODULES \\
    4247#define DEBUG_MODULE_ORXONOX            0
     
    5459#define DEBUG_MODULE_NULL_PARENT        0
    5560
    56 #define verbose DEBUG_SPECIAL_MODULE
    57 
    58 #endif
     61
     62#define HARD_DEBUG_LEVEL DEBUG_SPECIAL_MODULE
     63#endif /* DEBUG_SPECIAL_MODULE */
     64#endif /* MODULAR_DEBUG */
    5965///////////////////////////////////////////////////
    6066/// PRINTF: prints with filename and linenumber ///
     
    6672           PRINTF ## x
    6773
    68 #if DEBUG >= ERR
     74#if HARD_DEBUG_LEVEL >= ERR
    6975#define PRINTF1 \
    7076    if (verbose >= ERR) \
     
    7480#endif
    7581     
    76 #if DEBUG >= WARN
     82#if HARD_DEBUG_LEVEL >= WARN
    7783#define PRINTF2 \
    7884     if (verbose >= WARN) \
     
    8389#endif
    8490     
    85 #if DEBUG >= INFO
     91#if HARD_DEBUG_LEVEL >= INFO
    8692#define PRINTF3 \
    8793     if (verbose >= INFO) \
     
    9197#endif
    9298     
    93 #if DEBUG >= DEBUGING
     99#if HARD_DEBUG_LEVEL >= DEBUGING
    94100#define PRINTF4 \
    95101     if (verbose >= DEBUGING) \
     
    99105#endif
    100106     
    101 #if DEBUG >= vDEBUGING
     107#if HARD_DEBUG_LEVEL >= vDEBUGING
    102108#define PRINTF5 \
    103109     if (verbose >= vDEBUGING) \
     
    122128  PRINT ## x
    123129
    124 #if DEBUG >= ERR
     130#if HARD_DEBUG_LEVEL >= ERR
    125131#define PRINT1  \
    126132  if (verbose >= ERR)   \
     
    130136#endif
    131137
    132 #if DEBUG >= WARN
     138#if HARD_DEBUG_LEVEL >= WARN
    133139#define PRINT2 \
    134140  if (verbose >= WARN) \
     
    139145#endif
    140146
    141 #if DEBUG >= INFO
     147#if HARD_DEBUG_LEVEL >= INFO
    142148#define PRINT3 \
    143149  if (verbose >= INFO) \
     
    147153#endif
    148154
    149 #if DEBUG >= DEBUGING
     155#if HARD_DEBUG_LEVEL >= DEBUGING
    150156#define PRINT4 \
    151157  if (verbose >= DEBUGING) \
     
    155161#endif
    156162
    157 #if DEBUG >= vDEBUGING
     163#if HARD_DEBUG_LEVEL >= vDEBUGING
    158164#define PRINT5 \
    159165     if (verbose >= vDEBUGING) \
     
    178184           COUT ## x
    179185
    180 #if DEBUG >= 1
     186#if HARD_DEBUG_LEVEL >= 1
    181187#define COUT1 \
    182188    if (verbose >= 1 ) \
     
    186192#endif
    187193     
    188 #if DEBUG >= 2
     194#if HARD_DEBUG_LEVEL >= 2
    189195#define COUT2 \
    190196     if (verbose >= 2 ) \
     
    195201#endif
    196202     
    197 #if DEBUG >= 3
     203#if HARD_DEBUG_LEVEL >= 3
    198204#define COUT3 \
    199205     if (verbose >= 3 ) \
     
    203209#endif
    204210     
    205 #if DEBUG >= 4
     211#if HARD_DEBUG_LEVEL >= 4
    206212#define COUT4 \
    207213     if (verbose >= 4 ) \
  • orxonox/trunk/src/orxonox.cc

    r3548 r3592  
    3131#include "game_loader.h"
    3232#include <string.h>
    33 int verbose = 3;
     33int verbose = 4;
    3434
    3535using namespace std;
Note: See TracChangeset for help on using the changeset viewer.