Navigation


Changeset 174:2b2f78036749 in freeDiameter for include


Ignore:
Timestamp:
Feb 3, 2010, 3:58:56 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Added simple command-line switch to turn on full debug for specific function or file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/libfreeDiameter.h

    r168 r174  
    9898void fd_log_debug ( char * format, ... );
    9999extern pthread_mutex_t  fd_log_lock;
     100extern char * fd_debug_one_function;
     101extern char * fd_debug_one_file;
    100102
    101103/*
     
    166168
    167169/* Boolean for tracing at a certain level */
    168 #define TRACE_BOOL(_level_) ( (_level_) <= local_debug_level + fd_g_debug_lvl )
     170#define TRACE_BOOL(_level_) ( ((_level_) <= local_debug_level + fd_g_debug_lvl)                                         \
     171                                || (fd_debug_one_function && !strcmp(fd_debug_one_function, __PRETTY_FUNCTION__))       \
     172                                || (fd_debug_one_file && !strcmp(fd_debug_one_file, __FILE__) ) )
    169173
    170174/* The general debug macro, each call results in two lines of debug messages (change the macro for more compact output) */
Note: See TracChangeset for help on using the changeset viewer.