Navigation


Changeset 1213:b1c4876b1896 in freeDiameter for include


Ignore:
Timestamp:
Jun 18, 2013, 1:44:30 PM (11 years ago)
Author:
Sebastien Decugis <sdecugis@freediameter.net>
Branch:
default
Phase:
public
Message:

Change LOG_A definition so that when --dbg_func or --dbg_file are specified, the logs appear at DBG level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • include/freeDiameter/libfdproto.h

    r1212 r1213  
    315315#ifdef DEBUG
    316316# define LOG_A(format,args... ) \
    317                 LOG(FD_LOG_ANNOYING,format,##args)
     317                do { if ((fd_debug_one_function && !strcmp(fd_debug_one_function, __PRETTY_FUNCTION__)) \
     318                 || (fd_debug_one_file && !strcmp(fd_debug_one_file, __STRIPPED_FILE__) ) ) {           \
     319                        LOG(FD_LOG_DEBUG,"[DBG_MATCH] " format,##args);                                 \
     320                } else {                                                                                \
     321                        LOG(FD_LOG_ANNOYING,format,##args);                                             \
     322                } } while (0)
    318323#else /* DEBUG */
    319324# define LOG_A(format,args... ) /* not defined in release */
     
    375380/* Helper for tracing the CHECK_* macros below -- very very verbose code execution! */
    376381#define TRACE_CALL( str... )    \
    377                 if ((fd_debug_one_function && !strcmp(fd_debug_one_function, __PRETTY_FUNCTION__))      \
    378                  || (fd_debug_one_file && !strcmp(fd_debug_one_file, __STRIPPED_FILE__) ) ) {           \
    379                         LOG_A( str );                                                                   \
    380                 }
     382                LOG_A( str )
    381383
    382384/* For development only, to keep track of TODO locations in the code */
Note: See TracChangeset for help on using the changeset viewer.