Navigation


Changeset 302:d46b454ccc33 in freeDiameter


Ignore:
Timestamp:
May 13, 2010, 5:25:27 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Simplify traces format in case of non Debug configuration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/libfreeDiameter.h

    r258 r302  
    211211 The general debug macro, each call results in two lines of debug messages (change the macro for more compact output)
    212212 *************/
     213#ifdef DEBUG
     214/* In DEBUG mode, we add (a lot of) meta-information along each trace. This makes multi-threading problems easier to debug. */
    213215#define TRACE_DEBUG(level,format,args... ) {                                                                                    \
    214216        if ( TRACE_BOOL(level) ) {                                                                                              \
     
    221223        }                                                                                                                       \
    222224}
     225#else /* DEBUG */
     226/* Do not print thread, function, ... only the message itself in this case. */
     227#define TRACE_DEBUG(level,format,args... ) {            \
     228        if ( TRACE_BOOL(level) ) {                      \
     229                fd_log_debug(format "\n", ## args);     \
     230        }                                               \
     231}
     232#endif /* DEBUG */
    223233
    224234/*************
Note: See TracChangeset for help on using the changeset viewer.